Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

体验demo 打不开 #18

Closed
ghost opened this issue Feb 27, 2018 · 2 comments
Closed

体验demo 打不开 #18

ghost opened this issue Feb 27, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 27, 2018

https://player.alicdn.com/aliplayer/

@chengnuo
Copy link

chengnuo commented Mar 1, 2018

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

prismplayerh5demo@1.0.0 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! prismplayerh5demo@1.0.0 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 prismplayerh5demo@1.0.0 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

@alilmq
Copy link
Owner

alilmq commented Mar 2, 2018

@ 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

@ghost ghost closed this as completed Mar 3, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants