-
Notifications
You must be signed in to change notification settings - Fork 469
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
Change translations file cause app full reload instead of hot reload (lazy: true) #1252
Comments
I doubt this can be fixed. Probably reloading the page is the best we can do here. |
It seems this is a known issue, so I will close it. Thanks 🍺 |
Why do you think that it's not possible? 🤔 is it not possible to rerun the import and replace the reactive values? |
It's webpack that does import reloading and in that specific case, since it's an async import, the best it can do is reload the page since it wouldn't know how to reload that data. I believe that the only way that this could be made to work is if webpack would provide some hooks to override reloading behavior for specific imports but: Also, I guess a simple fix could be to just not use |
So if that would be really a fix (can`t validate that now) shouldn't that be mentioned with a hint in the documentation? |
6.28.1 Solved it for me; even with lazy: true ! :-) |
And the issue is back. And that without changing anything in nuxt.config.js ... weird (( |
I updated nuxt.config.js with the following and now lazy loading seems to work again... but I am still investigating...:: build: {
extend (config, ctx) {
// to solve You are using the runtime-only build of Vue where the template
// used to render links in information-base articles
config.resolve.alias.vue = 'vue/dist/vue.common'
config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map'
// for language compilation we use .coffee files: these are the least overhead so easy to change for non-developers
config.module.rules.push({
test: /\.coffee$/,
loader: 'coffee-loader'
},
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /(node_modules)/
})
}
} |
I saw how to implement Hot Reload in the official documentation of vue-i18n but I don't know where to put the |
Version
nuxt-i18n: 6.20.6 and 6.28.0
nuxt: 2.14.5
Nuxt configuration
mode:
Nuxt-i18n configuration
Reproduction Link
https://github.com/bahung1221/nuxt-i18n-hmr
Steps to reproduce
Change any text inside a translation file
What is Expected?
The app will be updated by
hot reload
What is actually happening?
The app updated by
full app reload
The text was updated successfully, but these errors were encountered: