Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

How to better add individual babel plugins? #24

Open
bahmutov opened this issue Feb 17, 2019 · 1 comment
Open

How to better add individual babel plugins? #24

bahmutov opened this issue Feb 17, 2019 · 1 comment

Comments

@bahmutov
Copy link
Contributor

I am trying to transpile spec that has

it('transpiles Object.fromEntries', () => {
  // https://github.com/tc39/proposal-object-from-entries
  const obj = Object.fromEntries([['a', 0], ['b', 1]])
})

I am trying to modify babel preset-env options via preprocessor to add useBuiltIns https://babeljs.io/docs/en/next/babel-preset-env#usebuiltins but nothing seems to work. I think a few more examples of adding support for specific babel transforms would be nice.

In general, I think a good question to answer in our docs would be:

Should users push Babel plugins into default options?
Or should they add them to .babelrc file and enable babelrc options?

@jamesarosen
Copy link

Babel 7.0 itself uses babel.config.js to configure plugins. @cypress/browserify-preprocessor doesn't obey babel.config.js, but I think it should. Other similar adapters like babel-jest do this.

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