-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Missing examples for HMR #902
Comments
I recommend looking at an older version of the repo if you want to see the examples. It was removed as the HMR example had some problems. As I understand it hmr has never really worked reliably enough for me to be comfortable having an example in the repo. If that changes I'd be happy to readdress. We should really remove reference to old examples from the repo |
If for you, as you wrote, "hmr has never really worked reliably enough" then I suggest adding an according warning to the section of the README, besides removing the reference to the old examples. My suggestion for that section: ### Hot Module replacement
We do not support HMR as we did not yet work out a reliable way how to set it up.
If you want to give `webpack-dev-server` HMR a try, follow the official [webpack HMR guide](https://webpack.js.org/guides/hot-module-replacement/), then tweak a few config options for `ts-loader`:
1. Set `transpileOnly` to `true` (see [transpileOnly](#transpileonly-boolean-defaultfalse) for config details and recommendations above).
2. Inside your HMR acceptance callback function, maybe re-require the module that was replaced. |
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. |
Closing as stale. Please reopen if you'd like to work on this further. |
Might want to update this part of the README https://github.com/TypeStrong/ts-loader/#hot-module-replacement rather than pointing to dead example links. |
Would you like to submit a PR? |
This fixes TypeStrong#902. It removes the dead example links and changes the wording to express that hot module replacement is not really supported by ts-loader.
This fixes #902. It removes the dead example links and changes the wording to express that hot module replacement is not really supported by ts-loader.
In https://github.com/TypeStrong/ts-loader#hot-module-replacement two example project setups for HMR are referenced, which were deleted in #899. Please describe more thoroughly in
README.md
what was once in the examples. I am at the moment struggling with setting up HMR and as a guidance tried to look at the examples before they were removed but also failed to make them work. :-/The text was updated successfully, but these errors were encountered: