UNPKG

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.

64 lines (61 loc) 1.56 kB
const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); const createStyledComponentsTransformer = require("typescript-plugin-styled-components").default; const styledComponentsTransformer = createStyledComponentsTransformer(); module.exports = { resolve: { alias: { react: path.resolve(__dirname, "node_modules/react"), "react-dom": path.resolve(__dirname, "node_modules/react-dom"), }, extensions: [".ts", ".tsx", ".js"], }, plugins: [ new HtmlWebpackPlugin({ template: "./public/index.html", inject: "body", // This injects the script tags in the body of the HTML }), ], module: { rules: [ { test: /\.js$/, exclude: /node_modules/, use: { loader: "babel-loader", options: { presets: ["@babel/preset-env", "@babel/preset-react"], }, }, }, { 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, }, }, ], }, ], }, };