This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
Make @glimmer/tracking an ember-cli addon for Ember apps. #306
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Today, when
@glimmer/tracking
is a dependency in an application (or addon) that also has a dependency on eitherember-auto-import
or is using Embroider the code that exists here for@glimmer/tracking
is actually shipped in the main vendor.js bundle. This is bad because that code is actually completely unused (since the babel transpilation will transform imports from@glimmer/tracking
intoEmber
globals method calls).The other issue is that Ember currently provides more capabilities from the
@glimmer/tracking
package than what is available to Glimmer.js users (for now):@glimmer/tracking/primitives/cache
. Ember 3.22 adds built in support for these caching primitives and enables that import path to work properly.Prior to these changes, attempting to import from
@glimmer/tracking/primtives/cache
would result in a build time resolution error:This works around the error by declaring that this package is an Ember addon, and it just happens to provide no files.
Fixes ember-polyfills/ember-cache-primitive-polyfill#3