How does this differ from ember-cli-babel-polyfills?
acorncom opened this issue · 3 comments
Glad to see experimentation around this type of thing these days! Out of curiosity, how do you see this differing from
https://github.com/pzuraq/ember-cli-babel-polyfills/ ?
Looks like this may more deliberately focus on an Electron usecase?
Thanks! Main difference:
ember-cli-fallback-builds
use more declarative and dummy way, without extra babel configuration and manual trsformation.
approach looks like this:
create one build using modern targets
create second build using legacy targets
merge builds, patch `index.html`, appending legacy stuff
fix known global definitions for moduled vendor.js
cleanup unused js files
done
ember-cli-babel-polyfills
- use set of babel plugins and perform amd
-> module
transform for modern browsers.
Using independent builds
approach (in ember-cli-fallback-builds
), we able to do more browser-related optimizations with independent addons, and babel plugins.
any addon may check for
process.env.BUILD_TARGET = LEGACY | MODERN
and apply custom logic
Thanks, that’s helpful