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

Support embroider's strictEmberSource option #12

Closed
wants to merge 8 commits into from

Conversation

mike-engel
Copy link
Contributor

@mike-engel mike-engel commented Dec 14, 2023

This adds support for embroider's strictEmberSource flag, which removes access to ember's internal require. This uses an ember macro to import the glimmer runtime via webpack instead.

Inspired by this comment.

  • Install @embroider/macros
  • Add macro condition to glimmer-overrides.ts
    • There's no way to know if this flag is turned on, so we add a custom flag to the macros config that libraries using this flag will need to set

@mike-engel mike-engel added the enhancement New feature or request label Dec 14, 2023
@mike-engel mike-engel requested a review from a team December 14, 2023 13:34
@mike-engel mike-engel self-assigned this Dec 14, 2023
Copy link

changeset-bot bot commented Dec 14, 2023

🦋 Changeset detected

Latest commit: 3dd6658

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
ember-provide-consume-context Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mike-engel mike-engel removed the request for review from a team December 14, 2023 13:51
@mike-engel mike-engel marked this pull request as draft December 14, 2023 13:51
ef4 added a commit to ef4/ember-provide-consume-context that referenced this pull request Dec 15, 2023
This is an alternative to customerio#12.

V2 addons automatically have direct access to all the imports provided by Ember. The challenge here is that `@glimmer/runtime` is private API that isn't in Embroider's supported list, so we need to configure it explicitly.
mike-engel pushed a commit that referenced this pull request Jan 16, 2024
* Demonstrate simpler way to access @glimmer/runtime

This is an alternative to #12.

V2 addons automatically have direct access to all the imports provided by Ember. The challenge here is that `@glimmer/runtime` is private API that isn't in Embroider's supported list, so we need to configure it explicitly.

* Add changeset

---------

Co-authored-by: Kevin Kucharczyk <kevin@customer.io>
@mike-engel
Copy link
Contributor Author

Closed in favor of #13

@mike-engel mike-engel closed this Jan 16, 2024
@mike-engel mike-engel deleted the support-embroider branch January 16, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant