This issue is a:
For my module, nwb has created an es folder with an index.js file starting as follows:
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
import { myThing } from '@myprefix/mylib'
// etc.
I'm using this in a monorepo together with create-react-app next branch 2.0.0-next.b2fd8db8.
Running a CRA app with a dependency on my nwb lib errors out with
error Import in body of module; reorder to top
I just confirmed this does not happen with react-scripts version 1.1.2, it will run fine.
I'm posting this here for now as I believe the error thrown by CRA is valid.
I will look at a repro in case this is not an obvious issue.
Is the version of nwb you're using installed globally or locally?
global
Which versions of Node.js, npm and nwb are you using (if using it globally)?
node -v 8.9.1
npm -v 5.7.1
# If nwb is being used as a global install
nwb -v 0.21.5
Which modules are installed in your project?
n.a. I think as the bug is triggered at a consumer.
This issue is a:
For my module, nwb has created an
esfolder with anindex.jsfile starting as follows:I'm using this in a monorepo together with
create-react-appnext branch2.0.0-next.b2fd8db8.Running a CRA app with a dependency on my nwb lib errors out with
error Import in body of module; reorder to topI just confirmed this does not happen with
react-scriptsversion1.1.2, it will run fine.I'm posting this here for now as I believe the error thrown by CRA is valid.
I will look at a repro in case this is not an obvious issue.
Is the version of
nwbyou're using installed globally or locally?global
Which versions of Node.js, npm and nwb are you using (if using it globally)?
Which modules are installed in your project?
n.a. I think as the bug is triggered at a consumer.