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

javascript - Calling webpack() function to compile in node environment
phpcn_u1582
phpcn_u1582 2017-07-05 10:59:47
0
1
928

Call under node

webpack(webpackConfig)

Compile and find that the compiled code is not compressed. In the command line, you can use webpack -p to uglify the code. But how to pass the additional parameters such as -p -w -d when calling the webpack() function under node?

phpcn_u1582
phpcn_u1582

reply all(1)
給我你的懷抱

-p is just an abbreviation.

https://webpack.js.org/api/cl...

-p actually means:

--optimize-minimize --define process.env.NODE_ENV="production"

And --optimize-minimize means:

  • Minimize javascript and switches loaders to minimizing

  • Plugin used: UglifyJsPlugin & LoaderOptionsPlugin

To build the package for the production environment, you can refer to this: https://webpack.js.org/guides...

All command line parameters can be configured in config.

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