You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simple [webpack](http://webpack.github.io/) plugin that generates `VERSION` and `COMMITHASH` files during build based on a local [git](http://www.git-scm.com/) repository.
9
+
Simple [webpack](https://webpack.js.org/) plugin that generates `VERSION` and `COMMITHASH` files during build based on a local [git](http://www.git-scm.com/) repository.
10
10
11
11
## Usage
12
12
13
-
Given a webpack project, install it as a local development dependency:
13
+
Given a **Webpack 4**project ([check bellow](#outdated-webpack) for **old Webpack versions**), install it as a local development dependency:
It is also possible to use [path substituitions](http://webpack.github.io/docs/configuration.html#output-filename) on build to get the revision, version or branch as part of output paths.
51
+
It is also possible to use [path substituitions](https://webpack.js.org/configuration/output/#output-filename) on build to get the revision, version or branch as part of output paths.
52
52
53
53
-`[git-revision-version]`
54
54
-`[git-revision-hash]`
@@ -69,7 +69,7 @@ module.exports = {
69
69
70
70
The `VERSION`, `COMMITHASH` and `BRANCH` are also exposed through a public API.
71
71
72
-
Example using the [DefinePlugin](http://webpack.github.io/docs/list-of-plugins.html#defineplugin):
72
+
Example using the [DefinePlugin](https://webpack.js.org/plugins/define-plugin/#usage):
73
73
74
74
```javascript
75
75
var gitRevisionPlugin =newGitRevisionPlugin()
@@ -168,3 +168,13 @@ module.exports = {
168
168
]
169
169
}
170
170
```
171
+
172
+
## Outdated Webpack
173
+
174
+
If your project is **not using Wepack version 4 or greater**, you will need to install an older version of this package:
0 commit comments