Closed wapcrazut closed 4 years ago
@theajr do you remember why we moved from ts-loader
to awesome-typescript-loader
? It was done in this commit https://github.com/jakoblind/webpack-autoconf/pull/51/commits/48fd35d78ef8789c25b6e1057ad1cbebb8b31651
@jakoblind I don't exactly remember but it has to do with Hot Module Replacement. As per their documentation, it seems they don't fully support or something is missing. Maybe that's why I switched to awesome-typescript-loader
.
Just we have to make sure the HMR support is working with react and normal web pack projects.
I just tested React+ts-loader and HMR, and it works. But the docs say they don't support it so.. I see three options
ts-loader
when react hot loader is not selected and awesome-typescript-loader
when it IS selected.I'm leaning against 1 or 2. what do you guys think?
2. Use `ts-loader` when react hot loader is not selected and `awesome-typescript-loader` when it IS selected.
@jakoblind I personally like this option for ensuring backwards compatibility but in the UI should describe the available options briefly explain (with the question mark button or similar) why this switch is begin made.
I agree @wapcrazut. This seems like the correct solution. Do you want to implement it?
Sure, I'll try to do some progress on my free time.
I'm merging this, and we can fix hot loading in separate PR
A simple change for using the recommended
ts-loader
instead theawesome-typescript-loader
.See how Webpack's TypeScript documentation indicates to use
ts-loader
too.Also see https://www.npmtrends.com/awesome-typescript-loader-vs-ts-loader for latest usage trends.
No major changes needed (I think).
Related to #79