Skip to content

Speed up development by automatically installing & saving dependencies with Webpack3.

Notifications You must be signed in to change notification settings

ysk2014/npm-install-webpack3-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm-install-webpack-plugin的功能加强,额外添加两个参数depsbabel

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"
        ]
    }
],

About

Speed up development by automatically installing & saving dependencies with Webpack3.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published