ng-redux icon indicating copy to clipboard operation
ng-redux copied to clipboard

'Unexpected token import' when building project with webpack

Open andy-dorman opened this issue 8 years ago • 1 comments

I'm looking into using ng-redux in order to refactor an existing project over to using redux. The project is currently built using webpack.

I've followed the Quick start guide, npm i --save-dev ng-redux but after a successful webpack compile I'm seeing an 'Unexpected token import' error in my browser console.

The offending line appears to be:

import baseGetTag from './_baseGetTag.js';

which looks like it's something lodash related perhaps?

If I open my app in firefox I get a syntax error, import declarations may only appear at top level

Has anyone had any similar issues? I'm sure I must be doing something wrong or missing something from my webpack config but I can't for the life of me see what.

andy-dorman avatar Sep 25 '17 22:09 andy-dorman

ok, panic over - it would appear very necessary to babelify lodash scripts... Up and running now...

andy-dorman avatar Sep 26 '17 00:09 andy-dorman