import baseGetTag from './_baseGetTag.js';
Closed this issue · 1 comments
anarerdene commented
Cannot use import statement outside a module
/project/node_modules/lodash-es/isNumber.js:1
import baseGetTag from './_baseGetTag.js';
palerdot commented
This happens because the build
setup of the project does not understand es6 modules
(keywords like import
, export
) ... There are two solutions ...
- you can stick with
0.10.x
by pinning your dependency since it is usinglodash
commonjs build. From0.11.x
,react-d3-speedometer
is usinglodash-es
since it will result in reduced final bundle size for your app. - The better way is make changes to your build setup by including
babel
(like using preset env) which will recognizees6 modules
. This will be done by default in almost all react setup likecreate react app
.
I"m closing this issue since this is a problem with the bundling setup of the project.