Closed jkarsrud closed 9 years ago
defeatureify must be run after the ES6 transpilation step
@rwjblue Thanks! Is there anyway to access the transpiled modules from an addon?
So, using the postprocessTree hook with the 'all'-tree from an addon will make it work, but it takes around 10 seconds in the app I've tested it in. Will look more into how we do it more like emberjs-build, where the list of features are seeded into the page for development
builds, and only defeatureify on production
builds.
Running this on a production build of an Ember-CLI app seems to make defeatureify freak out — probably because the source has already been minified. This results in a Cannot read property 'length' of undefined
error from defeatureify — not esprima this time.
Should be fixable now https://github.com/ember-cli/ember-cli/pull/3117.
I believe this can be closed.
As of now, Esprima doesn't support ES6 good enough to work directly on the app tree. This makes
ember build
fail with an "Unexpected reserved word"-error, and thus doesn't really defeature your code.Related issues: