electrode-io / electrode

Web applications with node.js and React
Other
2.1k stars 300 forks source link

gulp build broken #263

Closed mbriziarelli closed 7 years ago

mbriziarelli commented 7 years ago

Very easy to reproduce on my machine :

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.

animesh10 commented 7 years ago

We will take a look and update you

didi0613 commented 7 years ago

@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!

cross311 commented 7 years ago

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

cross311 commented 7 years ago

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.

animesh10 commented 7 years ago

Hi @cross311 : where are you facing this issue? During gulp build ?

cross311 commented 7 years ago

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

cross311 commented 7 years ago

@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.

jchip commented 7 years ago

we are no longer using gulp-uglify in the latest