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

Do not transform imports to use the Ember global for [email protected] and higher #387

Merged
merged 2 commits into from
Mar 17, 2021

Conversation

patocallaghan
Copy link
Contributor

PR supersedes #382

So after some discussion in #dev-ember-js there's been a change of plan with regards deprecating Ember Global support.

Now, rather than using babel-plugin-ember-modules-api-polyfill's useEmberModule option to transform packages to their global equivalents and use an imported Ember, the plan is to no longer transform Ember package imports to use the Ember Global.

Source file

import Component from '@ember/component'; Component.extend();

Versions of ember-source less than 3.27.0-alpha.1

define("foo", [], function () {\n "use strict";\n\n Ember.Component.extend();\n});

Versions of ember-source greater than or equal to 3.27.0-alpha.1

define("foo", ["@ember/component"], function (_component) {\n "use strict";\n\n _component.default.extend();\n});

@patocallaghan patocallaghan force-pushed the patoc/no-module-polyfill branch from 75e2f5e to a6c3862 Compare March 16, 2021 22:14
lib/ember-plugins.js Show resolved Hide resolved
node-tests/addon-test.js Outdated Show resolved Hide resolved
@rwjblue rwjblue changed the title Do not transform imports to Ember Global on certain versions of ember-source Do not transform imports to use the Ember global for [email protected] and higher Mar 17, 2021
@rwjblue rwjblue merged commit 77ca30c into emberjs:master Mar 17, 2021
@patocallaghan patocallaghan deleted the patoc/no-module-polyfill branch March 17, 2021 22:20
This was referenced Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants