Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Changes to Intl message aren't picked up by hot-loader #48

Open
paul-sachs opened this issue May 24, 2015 · 3 comments
Open

Changes to Intl message aren't picked up by hot-loader #48

paul-sachs opened this issue May 24, 2015 · 3 comments

Comments

@paul-sachs
Copy link

Any changes I make to en.js / it.js or any other localization file aren't picked up until I restart. Anyone know anyway to make the localization hot-loadable?

@gpbl
Copy link
Owner

gpbl commented May 25, 2015

Hi @psachs21 yup that's true! Nice catch.

I remember I was playing with the idea and I got it working, but it didn't make it into this project. It should be possibile by signing each file (en.js) with module.hot. Need to investigate and re-read the docs a bit ...

@paul-sachs
Copy link
Author

Alright cool, I'll take a look at that and see what I can do. Potential pull request perhaps. Thanks.

@paul-sachs
Copy link
Author

Hey @gpbl, I'm having trouble seeing where I can integrate hot loading into globalization. I've only really just started looking at nodejs in general and react even more recently. When you say "signing" each file, I thought maybe adding following was enough:

if(module.hot) {
module.hot.accept();
}

But I suspect that I have to do something on the code that loads these files for it to be accepted and I'm not sure where I start there. Could you provide any pointers?

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

No branches or pull requests

2 participants