webpack / webpack-pwa

Example for a super simple PWA with webpack.
https://webpack.github.io/webpack-pwa/page-shell/dashboard.html
808 stars 52 forks source link

build error `npm run build-shell` #7

Closed kntmrkm closed 7 years ago

kntmrkm commented 7 years ago

I got below error.

ERROR in afe436fe358f24997858.js from UglifyJs
SyntaxError: Unexpected token: punc ()) [afe436fe358f24997858.js:27,65]

ERROR in 2b1b28982bbce9a8fb90.js from UglifyJs
SyntaxError: Unexpected token: punc ()) [2b1b28982bbce9a8fb90.js:25,69]

ERROR in f57ea59692eeddb5f9ff.js from UglifyJs
SyntaxError: Unexpected token: punc ()) [f57ea59692eeddb5f9ff.js:25,69]

ERROR in shell-5232f0bea5d8b88088f5.js from UglifyJs
SyntaxError: Unexpected character '`' [shell-5232f0bea5d8b88088f5.js:153,42]
hyper

My env is...

macOS 10.12.3

kntmrkm:~/code/javascript/webpack-pwa (master %=) $ npm -v
3.10.10
kntmrkm:~/code/javascript/webpack-pwa (master %=) $ node -v
v6.9.5
sokra commented 7 years ago

see https://github.com/webpack/webpack-pwa/issues/3#issuecomment-276145869

addyosmani commented 7 years ago

npm i mishoo/UglifyJS2#harmony fixed it for me too. I think this issue could be closed if that addresses it for you, @kntmrkm.

kntmrkm commented 7 years ago

@here thanks guys.

fingerpich commented 6 years ago

I have the same problem, I have done these steps

why it doesn't work for me?

fingerpich commented 6 years ago

Its fixed when I change them to

    "uglify-js": "github:mishoo/UglifyJS2#harmony-v2.8.22",
    "webpack": "2.2.0",