node -v): v8.1.2npm -v): 5.0.3Trying to enable this, however it reloads the page whenever the JS is recompiled. Is this supposed to work out of the box?
?
Hi,
I have the same issue with AngularJS using TS.
I've had this issue before which was fixed by adding this lines at the end of my root react js file:
if (process.env.NODE_ENV === 'development') {
if (module.hot) {
module.hot.accept();
}
}
it also works if I put it in resources/assets/js/app.js [Laravel 5.4 Environment]
You can install this: babel-preset-react-hmre and add a .babelrc file with:
{
"presets": ["babel-preset-react-hmre"]
}
@oneso what is about AngularJS with Typescript?
Sorry i am not familiar with AngularJS. But i just set up webpack + react + typescript + hot reload. But this would be complete out of topic.
@oneso Can you point anyone looking for webpack + react + typescript + hot reload in the right direction?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
I've had this issue before which was fixed by adding this lines at the end of my root react js file:
it also works if I put it in
resources/assets/js/app.js[Laravel 5.4 Environment]