pughpugh / react-countdown-clock

HTML5 canvas countdown clock React component
ISC License
187 stars 83 forks source link

Version 2.6.0 & 2.7.0 makes UglifyJs triggers an error while building with webpack #62

Closed fmagaldea closed 2 years ago

fmagaldea commented 5 years ago

In "dev" mode, build is ok (no call to UglifyJs). But in "prod" mode, while building bundle with wepback, there is an error at the end of the process:

ERROR in assets-f7acaeef/bundle.js from UglifyJs
Unexpected token: punc ()) [assets-f7acaeef/bundle.js:57688,2858]

Extract of my package.json:

  "devDependencies": {
    "babel-core": "6.26.3",
    "babel-eslint": "10.0.1",
    "babel-jest": "23.6.0",
    "babel-loader": "7.1.5",
    "babel-polyfill": "6.26.0",
    "babel-preset-env": "1.7.0",
    "babel-preset-react": "6.24.1",
    "babel-preset-stage-0": "6.24.1",
    "babel-register": "6.26.0",
    "connect-history-api-fallback": "1.6.0",
    "copy-webpack-plugin": "5.0.3",
    "css-loader": "2.1.1",
    "file-loader": "3.0.1",
    "generate-json-webpack-plugin": "0.3.1",
    "html-webpack-plugin": "3.2.0",
    "imagemin-webpack-plugin": "2.4.2",
    "style-loader": "0.23.1",
    "uglifyjs-webpack-plugin": "2.1.2",
    "url-loader": "1.1.2",
    "webpack": "4.31.0",
    "webpack-cli": "3.3.2"
  }

My .babelrc:

{
  "presets": [
    "env",
    "react",
    "stage-0"
  ]
}

Works with react-countdown-clock 2.5.0 but fails with 2.6.0

fmagaldea commented 5 years ago

Looks like some new version of other package (webpack...) fixed this issue, so I close it.

fmagaldea commented 5 years ago

In fact, issue is still there.

rxluz commented 5 years ago

Same problem here

fmagaldea commented 5 years ago

Problem still there with 2.7.0 > we are stuck to version 2.5.0