Static GitHub Issues

[2747] HMR for nuxt modules

prev: Have entire request object in 'render:route' hook
next: How to use stylus in .vue style tag with lang attribute

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 in nuxt.config.js directly. Now, I've tried adding dependent files to build.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.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2384">#c2384</a>)</em></sub></div>