Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR stopped working with RC10 #165

Closed
CoolHandDev opened this issue Dec 22, 2018 · 5 comments
Closed

HMR stopped working with RC10 #165

CoolHandDev opened this issue Dec 22, 2018 · 5 comments

Comments

@CoolHandDev
Copy link

Describe the bug
Hot reloading stopped working with rc10

To Reproduce
vue add electron-builder
npm run electron:serve

Expected behavior
Electron is expected to launch, dev-tools to open, and HMR ready. HMR with rc9 was working fine

Screenshots

screen shot 2018-12-22 at 5 40 07 pm

Environment (please complete the following information):

  • OS and version: MacOS Mojave 10.14.2
  • node version: 11.5.0
  • npm version: 6.4.1
  • yarn version (if used):
  • vue-cli-plugin-electron-builder version : v1.0.0-rc.10
  • electron version: 4.0.0
  • other vue plugins used:
  • custom config for vcp-electron-builder:
  • (if possible) link to your repo:

Additional context
Add any other context about the problem here.

@rakakhrl
Copy link

I have the same issue, but changing it to rc9 still doesnt fix it. Is it because i use electron v2?

@CoolHandDev
Copy link
Author

This appears to be related to an existing issue with webpack-dev-server.

This is what worked for me. Starting from the beginning:

  1. vue create your-electron-vue-project
  2. cd your-electron-vue-project
  3. vue add electron-builder
  4. add a vue.config.js at the root directory of the project. This allows you to configure webpack (read Vue cli docs)
  5. inside the vue.config.js
    module.exports = { devServer: { headers: { "Access-Control-Allow-Origin": "*" }, https: false, disableHostCheck: true } };
  6. npm run electron:serve

Everything should work fine. Should this not work for you and you find another way, kindly share here.

Happy holidays!

@LukasBombach
Copy link

@CoolHandDev thank you, I had that exact same issue and that fixed it for me!

@CoolHandDev
Copy link
Author

@nklayman
Copy link
Owner

Closing as the issue is related to another package. Thanks for posting a solution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants