gaearon / gaearon/react-hot-loader
Can react-hot-loader work with not tsx/jsx files, but with dist/*.js which is a result of tsc compilation?
- Dominant language
- JavaScript
- Stars
- 12.2k
- Forks
- 775
- PR merge metrics
- No merged PRs in 30d
Description
Hi. Can react-hot-loader work with tsc - TypeScript Compiler - output (dist/*.js) generated from *.tsx source code? Such output is full of `React.createElement(..., React.createElement(...))` which e.g. looks like:

I.e., does the module process pure-JS react code (like above) with babel, or it relies on `<>` jsx syntax?
Background: we have a TypeScript monorepo with many projects. For various reasons (generally, modules reusability and watch-build performance) we let tsc compile everything from src/ to dist/ in each sub-project, and then we use webpack in some of projects to bundle this tsc output in dist/*.js as an input for bundles. In this configuration, webpack is totally unaware of TypeScript, it thinks that the project is pure-JS (and VSCode is totally unaware of webpack and thinks it's a pure TypeScript project BTW).
Contributor guide
Assessment
This issue has not been assessed yet.