Closed mbriziarelli closed 7 years ago
We will take a look and update you
@mbriziarelli Hi Maxime, I've tested in my local and the issue you brought up is not reproducible for me.
Steps for reproduce:
When we are running gulp build, the task will clean up the dist and dll for you first before generate any new builds. One possible reason generating this issue is due to UglifyJS doesn't yet support ES6. If thats the case, please switch to ES5 first. Related discussions: https://github.com/terinjokes/gulp-uglify/issues/276
If non of the above causing the issue, for better investigation, can you please provide a screenshot of the detailed error messages? Thanks!
I dont know if this is related but we are getting a similar error if we are export * from './some-folder-or-file
; looks like: https://github.com/babel/babel/issues/2877
Looks like if you use the plugin transform-runtime
you need to use the array syntax and do this: ["transform-runtime", { "polyfill": false }]
. Once I did that my minify worked fine. just need to test to make sure it still works.
Hi @cross311 : where are you facing this issue? During gulp build ?
We did not face it until we started doing export * from './some-file';
the transform-runtime babel plugin creates the dist file with an import
for a polyfill and uglify does not support import. @animesh10
@animesh10 We did not experience it on initial download of the stuff, but everyone will run into it if they have index files where they export folders.
we are no longer using gulp-uglify in the latest
Very easy to reproduce on my machine :
yo electrode
gulp dev
orgulp build
: everything should work finenpm install
gulp build
: the build will fail at the very end, on uglifyJS (error :GulpUglifyError: unable to minify JavaScript
)gulp build
anymore. It is like "dead".It is not a little one but a very annoying one : it prevents me for example to build my Electrode project in our Wercker CI/CD pipeline, since I'm doing a
npm install
step to rebuild the node_module folder in Wercker.yml.