Files outside src/ aren't compiled with Babel
See original GitHub issueProblem: Using ES6 feature like template string or fat arrow function notation, in any helper JS functions to fetch data and pass it to React components, npm start works fine but npm run build fails
Error:-
static/js/main.edbb179d.js from UglifyJs
SyntaxError: Unexpected token: operator (>) [./api/consensus_view-api.js:65,0]
static/js/main.d10c594a.js from UglifyJs
SyntaxError: Unexpected character '`' [./api/consensus_view-api.js:25,0]
node - 6.10.0 npm - 3.10.10 OS - MacOS El Capitan react-scripts: 0.9.3
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
The create-react-app imports restriction outside of src directory
I am trying to call an image from my public folder from a file inside my src/components . I am receiving this error...
Read more >Babel CLI
Compile the entire src directory and output it to the lib directory by using either --out-dir or -d . This doesn't overwrite any...
Read more >Documentation - Module Resolution - TypeScript
Module resolution is the process the compiler uses to figure out what an import refers to. Consider an import statement like import {...
Read more >rollup.js
js and webpack, you can use Rollup to compile to UMD or CommonJS format, and then point to that compiled version with the...
Read more >Configuration - Quokka.js
When using Babel to compile TypeScript files, Quokka will run your code using node instead of ts-node . An example configuration is shown...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh wow! Thanks for catching that. I moved that folder to src and it compiles successfully!
Replied there.