0.0.1 • Published 1 year ago

purge-cache-webpack-plugin v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

PurgeCacheWebpackPlugin

Why PurgeCacheWebpackPlugin?

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

Usage

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