Skip to content

Gavin-Gong/purge-cache-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PurgeCacheWebpackPlugin

Why PurgeCacheWebpackPlugin?

webpack won't purge oudateed filesystem cache files, although we have set maxAge in webpack config. This plugin provide a workaround to resolve this issue.

Usage

npm i purge-cache-webpack-plugin -D
// webpack config
const PurgeCacheWebpackPlugin = require("purge-cache-webpack-plugin")

/** @type {import('webpack').Configuration}*/
const config = {
  cache: {
    type: "filesystem", // only working with filesystem cache
    maxAge: 1000 * 60,
  },
  plugins: [
    new PurgeCacheWebpackPlugin(),
    // ...
  ],
  // ...
};

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published