bokuweb / re-bulma

[Deprecated] 💎Bulma components for React
http://bokuweb.github.io/re-bulma/
MIT License
364 stars 66 forks source link

Re-bulma Fails to build on UglifyJS step #75

Closed eltonjuan closed 7 years ago

eltonjuan commented 7 years ago

Due to Uglify JS's lack of support for ES2015 (see: https://github.com/mishoo/UglifyJS2/issues/659, https://github.com/webpack/webpack/issues/2545) , re-bulma causes UglifyJS to throw an error when using Webpack 2 (because of its use of the module) field. It seems that this can be fixed by adding the es2015 flag back into the es property of the .babelrc file. Although it kind of defeats the purpose of using the module field is seems like a pratical solution until UglifyJS is able to natively parse ES2015 code.

Error from webpack:

ERROR in vendor.7130423d.js from UglifyJs
    Unexpected token: operator (>) [./~/re-bulma/lib-es/helper/helper.js:1,0][vendor.7130423d.js:250,28]

Let me know your thoughts and I appreciate the help in this issue.

capaj commented 7 years ago

this is a problem of uglify js. If you use webpack 2 you should use a loader which is capable of parsing es2015. This is not a bug of re-bulma.

you can try with an alternative webpack by replacing a line in your package.json:

webpack": "fulls1z3/webpack#v2.2.1-harmony",

of try reopening this bug in webpack.