add-build-number-plugin
v0.0.6
Published
Set the build number on file
Downloads
74
Readme
Add Build Number Plugin
Webpack plugin for add build number to files.
Install
npm install --save-dev add-build-number-plugin
Usage
In your webpack.config.js
const AddBuildNumberPlugin = require('add-build-number-plugin');
module.exports = {
// ...
plugins: [
new AddBuildNumberPlugin({
test: /(.*)\.(js|css|gz)/,
needHash: /^prefix/,
output: `$1.[hash].[build-number].$2`,
buildNumber: process.env.BUILD_NUMBER
})
]
};
module.exports = {
// ...
plugins: [
new AddBuildNumberPlugin({
test: /(.*)\.(js|css|gz)/,
needHash: /^prefix/,
output: `$1.[hash].[build-number].$2`,
var: 'BUILD_NUMBER' // key from compilation
})
]
};