-
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
New option: staticEmberSource #1521
Conversation
Ugh, why oh why does ember-source have router.js as both a hard-coded inlined dependency and a real NPM dependency? |
the case of: ember test --environment=production
The final failures here are because ember-cli-fastboot uses We can probably still land this, but as a new option. |
This includes the newly-added one in this PR.
This is landed as a new option |
This restores a feature we did previously. At the time we backed it out because too many addons were relying on the
Ember
global in vendor.js. But after Ember 4 there is noEmber
global, so it seems likely to work this time.All our supported ember versions ship loose modules in their published package. The modules are normally not visible to the build though, because the ember-source addon manually packages them and stuffs them into vendor.js. This PR adds a compat adapter that stops that process.
The benefit of this is that each of the ember-source provided modules will only get pulled into the build if you actually use it.
One other problem we saw last time was that the deps that ship inside ember-source:
started taking precedence globally over any copies of those packages that were consumed normally by other packages. This PR addresses that by making our
renamedModules
andrenamedPackages
compatibility features less aggressive -- they will now only take effect if the consuming package doesn't have an explicit dependency. That is, if a package tries to import fromrsvp
, if it doesn't have a dependency onrsvp
we will redirect that to something likeember-source/rsvp.js
. But if they do have an explicit dependency on rsvp we will leave it alone.