angular-redux / ng-redux

Angular bindings for Redux
MIT License
1.16k stars 177 forks source link

'Unexpected token import' when building project with webpack #167

Open andy-dorman opened 7 years ago

andy-dorman commented 7 years ago

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 commented 7 years ago

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