-
-
Notifications
You must be signed in to change notification settings - Fork 372
Description
Steps to reproduce (on latest master):
- Run
preact create <app-name> cd <app-name>npm install --save redux preact-redux- In
app.js, initialize a store and hook it up with a<Provider>component npm run build
Expected result:
The build will succeed.
Actual result:
The build fails, since node_modules/preact-redux has a .babelrc file, which references the transform-node-env-inline plugin. Since #117, ES6 code under node_modules gets run through Babel. Babel picks up the .babelrc file in node_modules/preact-redux and fails, since the transform-node-env-inline dependency is not installed.
Installing the plugin (as well as the react and es2015 presets) fixes the problem, but I certainly don't think the expected behavior should be for the build process to npm i in every library folder that contains ES6 code (especially because most of them, preact-redux included, already ship with a precompiled ES5 version). Then again, you can't just assume that the CLI's Babel config will be sufficient for any given library that doesn't ship with ES5 code.
@prateekbh, thoughts?