npm-install-webpack3-plugin
v1.0.0
Published
Webpack3 loader to automatically npm install & save dependencies.
Downloads
4
Readme
对
npm-install-webpack-plugin
的功能加强,额外添加两个参数deps
和babel
deps
由于
npm-install-webpack-plugin
在安装less-loader
时不能自动安装less
,所以添加此参数来弥补。
- 默认:
{
"less-loader": ["less"],
"sass-loader": ["node-sass"],
"eslint-loader": ["eslint"],
"babel-loader": ["babel-core","babel-preset-env"],
"ts-loader": ["typescript"]
}
babel
由于
npm-install-webpack-plugin
检测babel时,只对.babelrc
进行检测,不能满足需求,所以添加此参数来弥补。
plugins: [
new NpmInstallPlugin({
babel: {
"presets": [
["env", {
"modules": false
}],
"stage-2"
]
}
],