-
Notifications
You must be signed in to change notification settings - Fork 137
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
Exclude 'babel-plugin-compact-reexports' during Stage 1 build #690
Exclude 'babel-plugin-compact-reexports' during Stage 1 build #690
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ember-engines doesn't use this plugin if module transpilation is disabled (see here). Have you looked into why that flag isn't set (therefore preventing this plugin from being added in the first place)?
We disable module compilation in stage1 here and stage2 here. But some addons insist on invoking babel or rollup directly and eliminate modules before we get a chance to stop them. Maybe that is the case here. |
I think the issue here is actually just one of timing. It looks like the check for Then later on when Embroider updates I'm definitely open to a different approach for avoiding that plugin if there's a cleaner way forward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems good to me, I don't see how we can modify ember-engines to avoid adding the babel plugin. As @charlespierce mentioned above ember-engines does this in its init
:
When this is ran (at addon init
) Embroider hasn't started loading, and there is no way to introspect that we will eventually be in an Embroider build.
@charlespierce - Ready for a rebase (should fix canary failures). |
22a541f
to
c1e3489
Compare
Info
babel-plugin-compact-reexports
, included byember-engines
, translates an ES Modules re-export statement (export { foo } from './bar'
) into a single-line AMD declaration, which saves space compared to the multiple lines an explicit import & export would use.Changes
babel-plugin-compact-reexports
during a stage 1 build.Tested
STAGE1_ONLY
build and confirmed that the reexport statements are not translated and are left as-is