1.0.0 • Published 1 year ago

html-webpack-plugin-add-asset-version v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Installation

      npm i --save-dev html-webpack-plugin-add-asset-version
      yarn add --dev html-webpack-plugin-add-asset-version

Basic Usage

the plugin will add a version number to the specified file , In order to prevent bugs caused by caching problems.

const HtmlWebpackPlugin = require('html-webpack-plugin');
const AddAssetVersion = require('html-webpack-plugin-add-asset-version');
const webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'dist',
    filename: 'index_bundle.js',
  },
  plugins: [
    new HtmlWebpackPlugin(),
    new AddAssetVersion({ noCacheFilesName: ['test.js','test.css'] }),
  ],
};