$ webpack --myopt yes
webpack.config.js
var argv = require('yargs').argv;
if(argv.myopt === 'yes'){
echo '获取到了自定义参数 --myopt';
}
$ webpack --myopt yes
webpack.config.js
var argv = require('yargs').argv;
if(argv.myopt === 'yes'){
echo '获取到了自定义参数 --myopt';
}