Error in import CSS, image files because CORS when build app
CrazyChildren opened this issue · comments
NextJS-Electron-Boilerplate is really a nice template for start. however, I notice a error when use yarn build
, style sheet and image file seems not loaded correctly. But it load correctly when debug using yarn start
.
And it occured in yarn frontend:build
, and it seems is caused by browser's CORS, the reference link of css and image is started with file//
which is not allowd with CORS.
some mention add webSecurity: false,
in BrowserWindow webPreferences would address this problem, but it don't works for me.
how to reproduce:
- clone the repo
- yarn install
- yarn build
- open app directly
platform
macOS x86
@CrazyChildren This should now be fixed in v2.2.1
, please give it a try!