Closed cbosco closed 10 years ago
I have been attempting a fix that basically runs uglify on the application JS prior to finding the bower dependencies but it raises 2 issues for me
(1) I don't want to uglify every bower file if it can be avoided since that would be slow (hence running uglify prior to finding the bower trees).
But I do want to include minified vendor assets...
(2) If I explicitly choose the minified versions of bower files to include that will work today, but I understand in the future bower packages may not be including the .min.js versions of the files leaving it up to your asset pipeline to minify
This looks like it was user error on my part; I wasn't actually adding the environment variable to my environment at all with my one-line command.
$ BROCCOLI_ENV=production && broccoli serve
I am unable to trigger the uglify step in this project, but it works in my pared down sample app prior to adding the ES6 transpiler.
I have tried it with
serve
:And with
build
:In both cases (with this sample app) I get a 1.8MB sized app.js file that is unminified.
I've also tried removing the production check altogether; same result.
My guess was it is an issue with the ES6 module concatenator step prior, since you perform uglify on the broccoli tree and not on the output (/assets/app.js).
In my example without ES6, compression works as I read directly from the tree instead of /assets folder.