-
-
Notifications
You must be signed in to change notification settings - Fork 433
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
Does ts-loader support HMR? #352
Comments
I am using this template. |
It works for me if I set |
In short - yes. Use |
I'll try and add an example at some point |
See our hot example |
404 |
https://github.com/TypeStrong/ts-loader#hot-module-replacement create an other entry ( require('./main');
if (module.hot) {
module.hot.accept(['./main'], function () {
require('./main');
});
} webpack.dev.js module.exports = {
mode: 'development',
entry: ['./src/hot.ts'],
// ....
} webpack.prod.js module.exports = {
mode: 'production',
entry: ['./src/main.ts'],
// ....
} |
I'm trying to get hot reloading working in my TypeScript project, following this example here: https://github.com/krausest/ts-webpack-hmr
The example code README states that ts-loader does not support HMR, but there also appears to be issues here that suggest it does. I can't switch to awesome-typescript-loader right now, as it appears to be incompatible with the "pixi.js" library that I'm using.
I've tried following the example, and while I'm able to call the
module.hot.accept
method, webpack doesn't seem to pick it up when I change my module, and reloads the entire page.Does ts-loader support HMR, and if so, would anyone have a working example I can refer to?
The text was updated successfully, but these errors were encountered: