Closed itayganor closed 4 years ago
it should work and there is test case less-theme-less-loader-multi-loader
.
if it does not work, re-open this and provide a re-produce repo, great thanks
I made a minimal example by striping down everything unrelated from my project: https://github.com/itayganor/webpack-css-themes-plugin-reproduction
I receive the following error:
(node:16580) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'light' of undefined
Investigation progress
It seems like the arrayed entry
causes the problem. when I switch to an object entry
, it successfully compiles.
The thing is that According to react-hot-loader docs the order of react-hot-loader/patch
before the app itself is important.
I changed
entry: [
'react-hot-loader/patch',
'./src/index.tsx'
],
to:
entry: {
main: ['react-hot-loader/patch', './src/index.tsx'],
},
It compiles successfully, but since excludeAssets: [/\.css$/],
, I have zero style tags in the page.
I'd imagined there will be a default theme applied
Closing since I have gone through major progress in it.
Hi there :)
Is there any way to configure this plugin to work with CSS Modules enabled?
(I'm using less, if it matters)
Thanks!