Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Document how to Babel-transpile dependencies in node_modules too #1100

Closed
edmorley opened this issue Sep 14, 2018 · 0 comments
Closed

Document how to Babel-transpile dependencies in node_modules too #1100

edmorley opened this issue Sep 14, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@edmorley
Copy link
Member

Currently Neutrino intentionally does not compile node_modules by default, since packages should be compiling down to ES5 themselves (even when using the module property in package.json). There is an increasing (and unfortunate) trend within the react-native packages to not do this - which resulted in confusion in #1046. (See facebook/create-react-app#1125 and facebook/create-react-app#3776 for more history on this area)

I believe the Neutrino default is currently the right thing to do (particularly since unlike CRA, it's easy to override), however it would be good to document how a project can enable the transpiling of node_modules - either via a single section on @neutrinojs/compile-loader or else a mention on all of the top-level presets.

The new section should include something like:
#1046 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants