Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

.babelrc instead of inline in package.json #200

Open
ashl1 opened this issue Oct 17, 2017 · 2 comments
Open

.babelrc instead of inline in package.json #200

ashl1 opened this issue Oct 17, 2017 · 2 comments

Comments

@ashl1
Copy link

ashl1 commented Oct 17, 2017

The case

  • some of libs in npm registry provides only ES6 builds
  • we want to support browsers with ES5 builds

Solution we use

  • enable babel for node_modules directory

Problem

While Babel is run for files provided by npm, the Babel configuration is presented in the package.json file. But the already babelified js file will be used. Threfore our (external) Babel tries to use (internal) Babel config. The configuration between your package and our Babel might be different.

Decision

Could you take the Babel settings out and put them on separate .babelrc file and add the file to .npmignore? If user wants to develop an app he will use Git sources with .babelrc. If he simply wants to use the builded form of your package, this won't be affected by the internal Babel settings.

@toxicFork
Copy link
Collaborator

toxicFork commented Oct 17, 2017 via email

@ashl1
Copy link
Author

ashl1 commented Oct 17, 2017

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

No branches or pull requests

2 participants