Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable babel (or preset-env) if not necessary #3191

Open
bfred-it opened this issue Jul 3, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@bfred-it
Copy link
Contributor

commented Jul 3, 2019

馃檵 Feature request

Most of the time lately I don't need babel, I just ship ES6 code (or let TypeScript do it)

Instead of requiring config in a separate file (be it browserlist or package.json) it'd be great to just disable the transpilation. This would let me use parcel from the command line without having to create a project and config

parcel build index.js --no-babel-preset-env

I think babel is currently used for more than preset-env so it wouldn't make sense to add a --no-babel flag.

馃 Expected Behavior

@babel/preset-env is not added to babel's config when the --no-babel-preset-env flag is added.

馃槸 Current Behavior

let plugins = presetEnv.default(
{assertVersion: () => true},
{
targets,
modules: false,
useBuiltIns: useBuiltIns ? 'entry' : false,
shippedProposals: true
}
).plugins;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.