git-revision-webpack-plugin
Advanced tools
Comparing version 3.0.3 to 3.0.4
@@ -16,4 +16,6 @@ var runGitCommand = require('./helpers/run-git-command') | ||
compilation.mainTemplate.hooks.assetPath.tap('asset-path', (path) => { | ||
return path.replace(replacePattern, data) | ||
compilation.mainTemplate.hooks.assetPath.tap('asset-path', (assetPath, chunkData) => { | ||
return (typeof assetPath === 'function' | ||
? assetPath(chunkData) | ||
: assetPath).replace(replacePattern, data) | ||
}) | ||
@@ -20,0 +22,0 @@ }) |
{ | ||
"name": "git-revision-webpack-plugin", | ||
"version": "3.0.3", | ||
"version": "3.0.4", | ||
"description": "Simple webpack plugin that generates VERSION and COMMITHASH files during build", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -75,7 +75,10 @@ # Git revision webpack plugin | ||
```javascript | ||
var gitRevisionPlugin = new GitRevisionPlugin() | ||
const webpack = require('webpack') | ||
const GitRevisionPlugin = require('git-revision-webpack-plugin') | ||
const gitRevisionPlugin = new GitRevisionPlugin() | ||
module.exports = { | ||
plugins: [ | ||
new DefinePlugin({ | ||
gitRevisionPlugin, | ||
new webpack.DefinePlugin({ | ||
'VERSION': JSON.stringify(gitRevisionPlugin.version()), | ||
@@ -82,0 +85,0 @@ 'COMMITHASH': JSON.stringify(gitRevisionPlugin.commithash()), |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21172
372
184