You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
I search for different combinations of keywords describing using react-scripts-ts for app with both tsx and jsx modules
Environment
npm ls react-scripts-ts (if you haven’t ejected): react-scripts-ts@2.6.0
node -v: v8.2.1
npm -v: 5.3.0
yarn --version (if you use Yarn): 0.27.5
<<<<<<< HEAD
npm ls react-scripts (if you haven’t ejected):
=======
npm ls react-scripts-ts (if you haven’t ejected):
Fix Code Review
Then, specify:
Operating system: Win7 SP1 x64
Browser and version (if relevant): Chrome 60
Steps to Reproduce
I have application with mixed js(x) and ts(x) modules, which I need to coexist and compile properly, however when I rename any of tsx modules to js or jsx, I get the build error:
create-react-app my-app
rename src/App.tsx => src/App.jsx
npm run build
Expected Behavior
Successfully compiled build/dist
Actual Behavior
Actual results:
./src/App.jsx
Module parse failed: c:\temp\test-react-typescript\src\App.jsx Unexpected token (9:6)
You may need an appropriate loader to handle this file type.
| render() {
| return (
| <div className="App">
| <div className="App-header">
| <img src={logo} className="App-logo" alt="logo" />
Reproducible Demo
Please just follow steps, it's very easy to reproduce.