electron-forge-docs
electron-forge-docs copied to clipboard
Hot reloading doesn't reload preload script
No matter which files I changed, Webpack watcher will refresh the page upon update. However, the preload.ts doesn't get loaded during this process. If type rs in the console as mentioned in the docs, it still doesn't load. It only works the first time the app is luanched.
Error:
Unable to load preload script: ~/.webpack/renderer/main_window/preload.js
module.exports = { entry: { main_window: './src/renderer/main_window.ts', preload: './src/renderer/preload.ts', }, output: { filename: '[name].js', path: path.resolve(__dirname, '.webpack/renderer'), }, }; Add path of preload