emberjs / ember.js

Ember.js - A JavaScript framework for creating ambitious web applications
https://emberjs.com
MIT License
22.45k stars 4.21k forks source link

Omit code for optional features that are turned off #18710

Open mehulkar opened 4 years ago

mehulkar commented 4 years ago

Talked to @pzuraq and he mentioned that it's theoretically possible to strip out ember-source code that won't be used due to optional-features. This tooling would be great incentive for apps to invest in moving in the direction the core team/communities deems as the way forward.

Not sure where this would happen, but opening here since it seems like a build time concern

(Reopening https://github.com/ember-cli/ember-cli/issues/9021)

rwjblue commented 4 years ago

Ya, we definitely have the tooling in place to do this safely.

lifeart commented 3 years ago

@rwjblue, @mehulkar is it something related to @glimmer/env? https://github.com/babel/ember-cli-babel/blob/master/index.js#L462 we have to search for global flags and replace it to FALSE for production builds?

lifeart commented 3 years ago

https://github.com/emberjs/ember.js/issues/18060 may be related

chancancode commented 3 years ago

I don't think so, #18060 is talking about canary features.