Back to Serwist

webpackCompilationPlugins

docs-next-configuring-webpack-compilation-plugins.md

latest653 B
Original Source

webpackCompilationPlugins

First added

Workbox

About

Optional webpack plugins that will be used when compiling the swSrc file. Only valid if compileSrc is true.

Usage

webpack.config.js

new InjectManifest({
  webpackCompilationPlugins: [
    webpack.DefinePlugin({
      __BUILD_TIME__ : webpack.DefinePlugin.runtimeValue(Date.now, {
        fileDependencies: [path.resolve(__dirname, "sample.txt")],
      }),
      __BUILD_VERSION__ : 15,
    }),
  ],
});

More resources

Here is a list of resources you can read to learn more about webpackCompilationPlugins: