Prior to these changes, setting config/optional-features.json to enable/disable optional features had no effect. The way that @ember/optional-features works is by ensuring that window.EmberENV is populated with specific custom values before Ember itself is evaluated. Unfortunately, splitting ember-source into assets/vendor-static.js and ensuring that assets/vendor-static.js evaluated beforeassets/vendor.js meant that the window.EmberENV (which is normally setup in assets/vendor.js by ember-cli) is no longer set prior to Ember evaluating.
The fix here is to ensure that window.EmberENV is setup by our vendor static prefix, and add tests confirming that optional features work properly.
Prior to these changes, setting
config/optional-features.json
to enable/disable optional features had no effect. The way that@ember/optional-features
works is by ensuring thatwindow.EmberENV
is populated with specific custom values before Ember itself is evaluated. Unfortunately, splittingember-source
intoassets/vendor-static.js
and ensuring thatassets/vendor-static.js
evaluated beforeassets/vendor.js
meant that thewindow.EmberENV
(which is normally setup inassets/vendor.js
by ember-cli) is no longer set prior to Ember evaluating.The fix here is to ensure that
window.EmberENV
is setup by our vendor static prefix, and add tests confirming that optional features work properly.Paired with @chriskrycho