assets-version-webpack-plugin
Generate the version number of the webpack resource into the JSON file
Install
$ npm install --dev-save assets-version-webpack-plugin
Usage
// webpack configmoduleexports = ... plugins: <option>
option:
optionName | Type | DefaultValue | Description |
---|---|---|---|
filename | String | 'version.json' | Generated file name |
includeDate | Boolean | true | File generation time |
includeHash | Boolean | true | Application fullBash value |
callback | Function | null | Used to customize the output and pass in version information |
version | String | 'v' | The key corresponding to the hash value of the file is used to check if the same file exists |
notice:
- Specify the callback option, which will no longer perform hash value checking
- The check does not abort the program, it just gives you an optimization tip
Output Reference
License
MIT