Closed maryschmidt closed 3 years ago
Hi, I'm struggling to get this package building with a custom Webpack config. I saw somewhere that Webpack needs to be configured to load CSS from node_modules, but I can't seem to get that working. Could you give me any pointers?
node_modules
const excludeCssPaths = [ /node_modules\/(?!(@uiw\/react-md-editor|@uiw\/react-markdown-preview)\/).*/ ];
new MiniCssExtractPlugin({ filename: '[name].[contenthash].css', chunkFilename: '[id].[contenthash].css', }),
{ test: /\.(css|less)$/, exclude: [...excludeCssPaths], use: [ MiniCssExtractPlugin.loader, { loader: 'css-loader', options: { importLoaders: 2, }, }, { loader: 'postcss-loader', }, { loader: 'less-loader', options: { lessOptions: { relativeUrls: false, }, }, }, ], },
Nevermind.. Was foiled by a lurking test webpack config that I hadn't updated 🤦🏼♀️
Hi, I'm struggling to get this package building with a custom Webpack config. I saw somewhere that Webpack needs to be configured to load CSS from
node_modules
, but I can't seem to get that working. Could you give me any pointers?