Multiple envs: 1 for node, 1 for browsers #6418
Labels
i: question
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
pkg: preset-env
Migrated from babel/babel-preset-env#189
Originally created by @verekia on Mon, 06 Mar 2017 15:58:57 GMT
Let's say we are using Babel on both the back-end with Node and on the front-end with Webpack. What would be the correct way to setup
babel-preset-env
so that it performs minimal transformations for Node, but more transformations for browsers when building with Webpack?From my understanding, Babel considers the lowest common denominator, even between different beasts like Node and browsers. Therefore, the following does not work from the tests I've run:
What would be your recommendation in such situation? Using 2 different
.babelrc
files?Is it something you plan to address in the future?
Thanks
The text was updated successfully, but these errors were encountered: