🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

cache-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

cache-webpack-plugin

webpack生成只修改文件

Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

cache-webpack-plugin

很多时候我们webpack生成的时候都只想生成我修改的文件,其余文件不生成而且这样也能加快一部分时间。cache-webpack-plugin就是为了解决这个需求。

# 先安装插件
$ (c)npm install cache-webpack-plugin -D

# 引入插件 webpack.config.js(配置文件)
$ const CacheWebpackPlugin = require('cache-webpack-plugin')
# 使用插件
$ plugins: [(new CacheWebpackPlugin()]

# 首次构建所有项目
$ npm run build
# 修改文件后再次构建
$ npm run build

# 参数设置
{
	# 缓存文件名称
	filename: '' 
}

tips:

1、如果想重新生成所有,删除/node_modules/.cahche/cache-webpack-plugin
2、可结合cache-loader配合使用节省打包时间,但是cache-loader和提取css插件有问题(issues
xiayulin

Keywords

cache

FAQs

Package last updated on 14 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts