2.0.1 • Published 5 years ago
@huslx/webpack-version-plugin v2.0.1
Getting Started
- Install with npm
npm install @huslx/webpack-version-plugin
- Install with yarn
yarn add @huslx/webpack-version-plugin
Usage
- Webpack
const webpack = require("webpack");
const { WebpackVersionPlugin } = require("@huslx/webpack-version-plugin");
module.exports = {
...
plugins: [
...
new WebpackVersionPlugin({ path: "../server" }),
]
}
- umi
const { UmiVersionPlugin } = require("@huslx/webpack-version-plugin");
module.exports = {
...
plugins: [
[
UmiVersionPlugin,
{
path: "../server",
}
]
]
}
It will genarate a version.json file in the target path。
Options
path
Type: String
Default: ".",
“path” is the place where you want put the version info。
version
Type: String
Default: random id