react-cascading-menu
Version:
A powerful React cascading dropdown component with multi-selection, search functionality, and hierarchical navigation. Perfect for building category selectors, dependent dropdowns, and nested menu systems with TypeScript support.
58 lines (56 loc) • 1.35 kB
JavaScript
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const createStyledComponentsTransformer =
require("typescript-plugin-styled-components").default;
const webpack = require("webpack");
const styledComponentsTransformer = createStyledComponentsTransformer();
module.exports = {
mode: "production",
entry: "./src/index.tsx",
output: {
path: path.resolve(__dirname, "build"),
filename: "index.js",
libraryTarget: "commonjs2",
},
externals: {
react: "react",
"react-dom": "react-dom",
},
resolve: {
alias: {
"react-cascading-menu": path.resolve(__dirname, "build"),
},
extensions: [".ts", ".tsx"],
},
module: {
rules: [
{
test: /\.tsx?$/,
use: {
loader: "ts-loader",
options: {
getCustomTransformers: () => ({
before: [styledComponentsTransformer],
}),
},
},
exclude: /node_modules/,
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"],
},
{
test: /\.svg$/,
use: [
{
loader: "@svgr/webpack",
options: {
svgo: false,
},
},
],
},
],
},
};