mbutki / ember-vendor-split

Splits the vendor.js into a dynamic (vendor.js) and static (vendor-static.js) half
MIT License
8 stars 9 forks source link

Ensure @ember/optional-features work properly. #19

Closed rwjblue closed 4 years ago

rwjblue commented 4 years ago

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 before assets/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.

Paired with @chriskrycho