Closed FagnerMartinsBrack closed 10 years ago
When I was writing this issue I realized I was using preProcessors=uglifyJs
. Of course it would incur an error because I am telling wro4j to minify before the concatenation would happen. But since I spend a few minutes start writing this, I finished and posted this in the hope that if someone else has the same problem He will find the obvious solution here :D
Thanks for sharing this.
Reading again I realized the solution wasn't clear:
You should not be using ...
preProcessors=uglifyJs
... instead you should be using...
postProcessors=uglifyJs
That's because the minification should be done AFTER the concatenation, not before.
@FagnerMartinsBrack Don't you prefer the google closure instead of uglifyJs?
What is the difference?
its faster and I don't think it would break the minimization for this particular case when used as preProcessor.
The thing is that, for my purpose, it doesn't matter if minification is done before or after the concatenation. The only benefit would be the "faster" thing, but for now there's no bottleneck to be worried about. I will take a look in other tools later, though.
I have a partial JS file named
intro-win-jquery.js
that I use to wrap non AMD module into a proper one, mocking the gobal variabled and cleaning after the script is executed:intro-win-jquery.js:
Everything works fine using maven plugin without minification, but when I am going to minify all my resources I get the following exception:
It seems wro4j fails to process my invalid script file. The thing is that the script file is invalid by design, it is not supposed to execute but just to concatenate.
wro.properties: