Git Product home page Git Product logo

Comments (2)

chengnuo avatar chengnuo commented on July 16, 2024

我也是同样的问题,本地demo报错

[email protected] dev /Users/xjc/my-project/h5demo-master
webpack-dev-server --devtool eval --config webpack.config.js --progress --hot --content-base src

/Users/xjc/my-project/h5demo-master/node_modules/webpack/lib/webpack.js:159
throw new RemovedPluginError(errorMessage);
^

Error: webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead.
at Object.get [as UglifyJsPlugin] (/Users/xjc/my-project/h5demo-master/node_modules/webpack/lib/webpack.js:159:10)
at Object. (/Users/xjc/my-project/h5demo-master/webpack.config.js:3:41)
at Module._compile (module.js:660:30)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)
at WEBPACK_OPTIONS (/Users/xjc/my-project/h5demo-master/node_modules/webpack-cli/bin/convert-argv.js:133:13)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: webpack-dev-server --devtool eval --config webpack.config.js --progress --hot --content-base src
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/xjc/.npm/_logs/2018-03-01T05_37_49_368Z-debug.log

from h5demo.

alilmq avatar alilmq commented on July 16, 2024

@ iloveyo123u1 demo演示地址应该是可以访问的了

@chengnuo 你是不是了最新的webpack 4了, 语法不一样了,你可以自己修改一下webpack的配置,
By default in dev mode webpack 4 won't minimize js, this is to speed up development. As soon as you switch mode to production or use the -p while running webpack it will automatically minimize your JS there is no need for uglifyjs setup anymore in webpack 4.
可参考
https://stackoverflow.com/questions/49041167/correct-way-to-use-minimize-javascript-in-webpack-config-js

from h5demo.

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.