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

Add a mode that converts to @embroider/macros #96

Merged
merged 1 commit into from Apr 17, 2024
Merged

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Apr 17, 2024

This is intended as a compatibility path for packages (like ember-source) that make heavy use of babel-plugin-debug-macros and want to become valid V2 addons.

A v2 addon can't bring its own custom build pipeline along into apps. If they want to make compile-time decisions, they need to do it through the standardized @embroider/macros.

This implementation does the smallest, simplest thing, which is replacing the hard-coded boolean we used to emit with a call to isDevelopingApp() from '@embroider/macros`. It relies on the same kind of dead-code elimination that this babel plugin has always relied on.

This is intended as a compatibility path for packages (like ember-source) that make heavy use of babel-plugin-debug-macros and want to become valid V2 addons.

A v2 addon can't bring its own custom build pipeline along into apps. If they want to make compile-time decisions, they need to do it through the standardized `@embroider/macros`.

This implementation does the smallest, simplest thing, which is replacing the hard-coded boolean we used to emit with a call to `isDevelopingApp()` from '@embroider/macros`. It relies on the same kind of dead-code elimination that this babel plugin has always relied on.
@ef4 ef4 merged commit 2c578a6 into main Apr 17, 2024
4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the embroider-macros branch April 17, 2024 22:00
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.

None yet

1 participant