Open ashl1 opened 6 years ago
That sounds reasonable, do you have an example set up so I can try to see if I did it right?
On Tue, Oct 17, 2017, 21:18 Alexey Shildyakov notifications@github.com wrote:
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.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/toxicFork/react-three-renderer/issues/200, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0iLQ-gWZ7JWBwDn1lRMsS9bw7Gq3SGks5stQtAgaJpZM4P8wbf .
FYI https://philipwalton.com/articles/deploying-es2015-code-in-production-today/ I can make a PR tommorow
The case
Solution we use
babel
fornode_modules
directoryProblem
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.