Coder Social home page Coder Social logo

Comments (3)

meikidd avatar meikidd commented on July 18, 2024

Thanks for reporting this issue, could you share your webpack config file? I am also using webpack uglify plugin in my project but haven't encountered this error.

from iso-639-1.

ragesoss avatar ragesoss commented on July 18, 2024

Here's the main webpack config file: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/gulp/tasks/webpack.js

Also possibly relevant: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/.babelrc

It's possibly that different babel config would fix the problem, as I think it's caused by ES6 syntax that Uglify doesn't handle... so if it's already transpiled to ES5, I've read that it should work.

Interestingly, the error doesn't cause any noticeable effects in the development environment — things all work as expected, including the use of this module, and there are no console errors — but the browser tests all fail.

from iso-639-1.

meikidd avatar meikidd commented on July 18, 2024

I think we include different version of UglifyJsPlugin,

In my webpack config file:

const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

new UglifyJsPlugin({ ... })

In your config file #L54:

new webpack.optimize.UglifyJsPlugin({ ... })

The bellow explaination is from webpack-contrib/uglifyjs-webpack-plugin

webpack < v4.0.0 currently contains v0.4.6 of this plugin under webpack.optimize.UglifyJsPlugin as an alias.

I guess the error will disappear when you update the UglifyJsPlugin module.

from iso-639-1.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.