Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As I tried to figure out how to upgrade to React Hot Loader 4 today, I was a bit confused by the options for configuring it for use with TypeScript -- it seems less than ideal to chain loaders, and in particular requiring folks to change their tsconfig is pretty annoying. Either way, there's a performance hit.
I think the ideal, most non-disruptive solution for TypeScript users would be for RHL to eventually support a TypeScript custom transform plugin as discussed here -- but for now, since Babel can consume TypeScript syntax and transpile it, why not recommend using it alone as the simplest method? There's no requirement for users to change their tsconfig, rebuilds are lightning-fast, and you can still typecheck with fork-ts-checker-webpack-plugin (or manually invoking
tsc --noEmit
).In this PR I've provisionally updated the README with more verbose (but hopefully simpler) instructions and changed the TypeScript example to reflect this configuration -- maybe folks can try it out and see what they think?