electron-userland / electron-userland/electron-webpack
HMR not working with Vue (always doing full reloads)
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
Hi guys,
I set up a project using electron-webpack using Vue.
HMR is enabled but I always get this error:
> **Cannot apply update. Need to do a full reload!**
> module.exports @ log.js:26
> (anonymous) @ dev-server.js:39
> Promise rejected (async)
> check @ dev-server.js:36
> (anonymous) @ dev-server.js:55
> emitOne @ events.js:116
> emit @ events.js:211
> reloadApp @ index.js?http://localhost:56402:221
> ok @ index.js?http://localhost:56402:134
> onmessage @ socket.js:41
> EventTarget.dispatchEvent @ sockjs.js:170
> (anonymous) @ sockjs.js:887
> SockJS._transportMessage @ sockjs.js:885
> EventEmitter.emit @ sockjs.js:86
> WebSocketTransport.ws.onmessage @ sockjs.js:2961
> log.js?1afd:26 **[HMR] Error: Aborted because ./node_modules/material-design-icons-iconfont/dist/material-design-icons.css** is not accepted
> Update propagation: ./node_modules/material-design-icons-iconfont/dist/material-design-icons.css -> ./src/renderer/index.js -> 0
> at hotApply (http://localhost:56402/renderer.js:478:30)
> at http://localhost:56402/renderer.js:316:22
> at
Happens with any other CSS file, too.
I tried to add "if (module.hot) module.hot.accept()" in my renderer/index.js, and then HMR doesn't do a full reload, but changes in my templates during runtime are not adopted anyway.
Any ideas?
- Electron-webpack: 2.1.2
- Electron-webpack-vue: 2.1.3
- Vue: 2.5.17
- Webpack: 4.16.5
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.