亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

javascript - Webpack plug-in UglifyJsPlugin feels contradictory when reading the documentation?
過去多啦不再A夢
過去多啦不再A夢 2017-05-19 10:46:29
0
1
784

1. First of all, the official website "Guide" says that UglifyJsPlugin is a built-in plug-in, just use it directly

2. Then on the plug-in introduction page, it says that UglifyJsPlugin requires the plug-in to be installed to use it, and also

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

State this sentence as required, but doesn’t it contradict the first point?


So: I gave it a try and found that there is no need to install or declare require, and it can be used directly

Then, I was a little confused...

過去多啦不再A夢
過去多啦不再A夢

reply all(1)
左手右手慢動作

webpack.optimize.UglifyJsPlugin is the core plug-in of webpack. It comes with it and can be used directly.

And webpack.optimize.UglifyJsPluginuglifyjs-webpack-plugin and uglifyjs-webpack-plugin are the same plug-in,
It is mentioned in the first paragraph of your second picture, and the purpose is also mentioned, You can install the specified UglifyJS version , instead of using the one that comes with webpack, this is the only difference.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template