1.0.0 • Published 1 year ago
html-webpack-plugin-add-asset-version v1.0.0
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'] }),
],
};
1.0.0
1 year ago