-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Add support for hot reloading #71
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for you PR.
I checked your codes.
Great!! 👍
I believe that this features useful in development as with Vuex hot reloading.
All unit tests of this changing is passed. ✅
In sauce labs e2e, failed error, but no worries due to sauce labs setting issues. 😛
However, Seemingly I could not find the hot reloading test cases.
I hope that you add the these test cases. 😉
```javascript | ||
// Support hot updates | ||
if (module.hot) { | ||
module.hot.accept(['./en', './cn'], () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adjust the indent 2
spaces level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed it :)
Added also a test for hot reloading. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thanks!
Thank you for your project! It's really helped me. ❤️
In development it's annoying to lose the application state after a reload for an updated translation. This PR fixes that by moving the
locales
into the language VM.I also included an example for the documentation for enabling hot reloading of translation.