Closed C0pyR1ght closed 4 years ago
Hello ( :
So, yeah I believe the problem is because of uglifyjs
, since I am using it to minify the file.
UglifyJS does not support es6.
const
is an es6 declaration, so it throws an error. ChrisR on StackOverflow
No worries though, I'll find a different package to use instead of uglifyjs
. If you have any recommendations for annpm
package that minifies JS files, please let me know.
You can solve the issue temporarily using
var
instead ofconst
. But I promise you won't need to, I'll fix the issue today ( :
I will be using babel-minify
instead.
I also tested it in Auto-Minify-Test/issues#5
Here's a screenshot of the commits ( :
Kindly let me know if there is anything else you'd want me to fix or add :D
By the way, I have been thinking of making it possible for users to pass their own "options" to the
babel-minify
and theclean-css
commands being run. Let me know if that is something you are interested in so I work on adding it. If it isn't, so I don't waste time on it and work on something else.
Released v1.6
with ES6+ Support on the Marketplace ( :
Just update the version you are currently using, and kindly let me know if you run into any new issues or if you have any recommendations!
Thanks a lot for all the contributions you have been doing. :heart:
great, thanks for your quick fix
Minifaction process fails with
Unexpected token: keyword «const»
ifconst
is used in a file that is should be minified.Example: