Closed revelt closed 6 years ago
Hi Harsh, thanks for the link, it still does not answer my question though...
Why does babel-preset-env
have no settings (I'm talking about UMD part) for the target environment?
OK, I got what you're saying, it comes from .babelrc
in the root. OK.
Will close now. Thanks!
I'm talking about
babel
branch specifically.Correct me if I'm wrong, but the point of
babel-preset-env
is to automate the Babel settings, specifying only the target platform, like"targets": { "browsers": ["last 2 versions", "ie >= 7"] }
or"browsers": "> 5%"
and so on. The Babel then knows what level of transpiling is needed. Because maybe, for example, your internal corporate portal is ran by Chrome users only. Or, for example, you can't sort out IE flexbox bugs and block it completely.For example,
.babelrc
would have settings forbabel-preset-env
:Now, I see we set the Babel settings in
rollup.config.js
:UMD settings part:
My question: why does
babel-preset-env
have no settings in UMD part for the target environment? Is it because we want to make the module the most universal and therefore we apply the maximum transpiling?