Open MassMessage opened 2 years ago
I can't say what exactly is missing, but normally, there is much more config generated by electron-webpack.
In your config module, export a function instead of an object. That function will receive the prepared config, which you can log to the console for comparison. The function should return the final config.
Normally, you would make changes to that config object and not use a completely new one.
Thanks for your reply. See the update in the orignal post. I was just trying to find a better to debug it so I found I could use a export function instead of an object. It seems to have a proper module to load the css file, out the rules I got from the export function but I still got the error. Any idea why?
Shot in the dark, gut feeling: Are you importing a css file from node_modules from within your App.css? If so, don't do it. Instead, import it from your App module directly. That is: from your JS module, App.js/jsx/ts/tsx. Basically you could and probably should do it in your entry file, e.g src/renderer/index I believe that the style loaders explicitly exclude node_modules..
I created the settings file electron-webpack.json and webpack.renderer.additions.js as below but when I run electron-webpack dev I still get the error below. What am I missing?
the error:
electron-webpack.json
webpack.renderer.additions.js
UPDATE 1
Now I'm using an export function like below, it's easiert to debug, I guess. Here's the export function I'm using:
the output is:
So out this I can see there are some css rules and the associated module of it like:
but I still getting the css load error. What am I missing?
UPDATE 2:
I've tried define the export function as the below but I still get same error: