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

🐛 Fix AMD bundle #290

Merged
merged 1 commit into from
Apr 5, 2021
Merged

🐛 Fix AMD bundle #290

merged 1 commit into from
Apr 5, 2021

Conversation

wwilsman
Copy link
Contributor

@wwilsman wwilsman commented Apr 5, 2021

What is this?

AMD bundles have two syntaxes: define(id, deps[], factory) and define(deps[], factory) (filename becomes the ID). We were inadvertently combing the syntaxes into define([id], factory).

While our incorrect syntax is technically valid (circular dep on itself), we had another compounding issue. We were using pkg.name for the ID even when the package contains multiple bundles (like for test helpers).

While requiring the AMD bundle in Ember SDK tests, this compounded issue caused the test helpers to re-require the main package bundle which caused duplicate bundles to be included causing the test helpers to use outdated references.

This PR simply removes AMD deps from our bundles since our bundles do not actually contain external deps.

@wwilsman wwilsman added the 🐛 bug Something isn't working label Apr 5, 2021
@wwilsman wwilsman requested a review from Robdel12 April 5, 2021 20:16
Copy link
Contributor

@Robdel12 Robdel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏁

@wwilsman wwilsman merged commit 85a612c into master Apr 5, 2021
@wwilsman wwilsman deleted the ww/fix-amd-bundle branch April 5, 2021 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants