webpack.config.babel.js Unexpected token import
See original GitHub issuei’d appretiate a double check in webpack.config.js. i’m not a seasoned webpacker
and it seems it has this import / loader issues.
webpack.config.babel.js:1
(function (exports, require, module, __filename, __dirname) { import fs from 'fs';
^^^^^^
SyntaxError: Unexpected token import
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
`Unexpected token import` in `webpack.config.babel.js` when ...
I'm guessing this is because babel-loader doesn't act on webpack.config.babel.js , and so it's not recognising the import keyword. The error ...
Read more >Unexpected token when using import() · Issue #493 - GitHub
I'm submitting a bug report Webpack Version: 3.3.0 Babel Core Version: 6.25.0 Babel Loader Version: 7.1.1 Please tell us about your ...
Read more >webpack/webpack - Gitter
So I have import loadCurrentUser from 'accounts/actions' and accounts is the alias. ... exceptions like "Unexpected token import" on webpack.config.babel.js ...
Read more >Unexpected token import` in `webpack.config.babel.js` when ...
You have created a webpack.config.js and when tying to execute webpack you are getting above error. Cause your webpack config file need to...
Read more >Javascript – Error in using 'import' in webpack.config.babel.js
It seems like this occurs because it can't read import or webpack doesn't support import . I tried to use babel-register but it...
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 Free
Top 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
This .babelrc file will do it
this is what triggers it
["es2015", {"modules": false}]
Right, would be a webpack 2 thing. That’s why this project uses webpack 1 😛