您的位置:首页 > Web前端 > Webpack

[Webpack 2] Validate your Webpack config with webpack-validator

2016-06-22 03:51 531 查看
It’s quite common to make a mistake while developing your webpack configuration. A simple typo can cost you hours of development time. With webpack-validator, you can save yourself a ton of time by validating that your webpack configuration is free of common mistakes.

install:

npm i webpack-validator --save-dev


Scripts:

"validate": "npm-run-all --parallel validate-webpack:* lint test --serial check-coverage",
"validate-webpack:dev": "webpack-validator webpack.config.js --env.dev",
"validate-webpack:prod": "webpack-validator webpack.config.js --env.prod",


When you have something wrong in webpack.config.js, it will tell you.

Check: Link
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: