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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks with @babel/preset-env@7.4.3 #64

Closed
machty opened this issue Aug 27, 2019 · 9 comments · Fixed by #109
Closed

Breaks with @babel/preset-env@7.4.3 #64

machty opened this issue Aug 27, 2019 · 9 comments · Fixed by #109

Comments

@machty
Copy link

machty commented Aug 27, 2019

I wanted to make sure this issue didn't fall in the cracks, as I believe it nuked almost an entire day of work for me yesterday, and the way it fails is veeery subtle and tricky.

See here for references to this issue:

In short, there are combinations of values in config/target.js and the plugins added in @babel/preset-env@7.4.3 that will cause things like import EmberObject from '@ember/object' to be converted to an undefined _EmberObject instead of Ember.Object.

cc @chadhietala and @rwjblue

@lukemelia
Copy link

I have seen this as well. It is a tortuous experience.

@Leooo
Copy link

Leooo commented Dec 6, 2019

Same here. A massively tricky one to debug. Without @rwjblue 's help we could never have.

For now we reverted to using

/* eslint-env node */
module.exports = {
  browsers: [
    'ie 9',
    'last 1 Chrome versions',
    'last 1 Firefox versions',
    'last 1 Safari versions'
  ]
};

in our config/target.js

from

/* eslint-env node */
module.exports = {
  browsers: [
    'last 1 version',
    '> 2% in GB'
  ]
};

but obviously not ideal so happy to follow the resolution on this.

@raido
Copy link

raido commented Dec 23, 2019

I recently ran into same thing and @rwjblue pointed me here.

Reference issue I opened over here:

emberjs/ember-cli-babel#316

@raido
Copy link

raido commented Jan 16, 2020

@rwjblue any hope of this getting some attention?

I tried to debug to some extent it by linking this package locally, but did not manage to find where exactly transformations break.

@rwjblue
Copy link
Member

rwjblue commented Feb 5, 2020

The fix for this is basically the same as what was done in ember-data/babel-plugin-ember-data-packages-polyfill#3

@rwjblue
Copy link
Member

rwjblue commented May 27, 2020

This seemed to crop up again when running Babel 7.10.0+ (released 2020-05-25). I'm looking into fixing (based on my last comment).

@runspired
Copy link

@rwjblue I have time this afternoon if needed to supply a fix

@rwjblue
Copy link
Member

rwjblue commented May 28, 2020

Thanks @runspired, definitely will appreciate the help (either in reviews or impl).

After a bunch of general repo cleanup, I've reproduced the failures being reported in #108.

@rwjblue
Copy link
Member

rwjblue commented May 29, 2020

ember-cli-babel@7.20.1 was just released, and should fix the underlying issue.

https://github.com/babel/ember-cli-babel/releases/tag/v7.20.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants