-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 for nuxt modules #2747
Comments
Exactly the same here, and I've also tried to add files in build.watch, but nothing happen when changing them... |
I think I've found one part of the problem: #2983 But it's true than the modules are not reloaded during the build, so I totally agree with you. |
An update from my side: I'm using Nuxt in setup with Express (from As a conclusion, I can suggest that the documentation of |
@Zip753 actually as I said, only the webpack part of the build is reloaded when adding a file in watch, so the modules are not reloaded at all, event with nuxt dev. |
@mathieutu @Zip753 Does the latest |
Nope I don't think so, sorry. |
The latest edge has introduced a new config Docs: https://github.com/nuxt/docs/blob/2.0/en/api/configuration-watch.md |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Is there a way to use HMR with nuxt modules? In my specific case I'm using
nuxt-i18n
module, which requires a set of translations as a module param specified innuxt.config.js
directly. Now, I've tried adding dependent files tobuild.watch
config, but the app doesn't seem to reload, and from the source code it seems that the modules aren't affected by HMR in any way.Therefore, from my perspective, there should either be a way to rebuild modules in HMR somehow, or there should be a better way to provide module options, so that they are automatically watched by HMR.
I haven't dug into how Webpack HMR works, but I suppose there is a way to write custom plugin for that to work, still it would be a great functionality if it was done out of the box.
The text was updated successfully, but these errors were encountered: