@@ -17,7 +17,7 @@ npm install --save-dev git-revision-webpack-plugin
1717Then, simply configure it as a plugin in the webpack config:
1818
1919``` javascript
20- var GitRevisionPlugin = require (' git-revision-webpack-plugin' )
20+ const { GitRevisionPlugin } = require (' git-revision-webpack-plugin' )
2121
2222module .exports = {
2323 plugins: [new GitRevisionPlugin ()],
@@ -70,7 +70,7 @@ Example using the [DefinePlugin](https://webpack.js.org/plugins/define-plugin/#u
7070
7171``` javascript
7272const webpack = require (' webpack' )
73- const GitRevisionPlugin = require (' git-revision-webpack-plugin' )
73+ const { GitRevisionPlugin } = require (' git-revision-webpack-plugin' )
7474const gitRevisionPlugin = new GitRevisionPlugin ()
7575
7676module .exports = {
@@ -95,7 +95,7 @@ The plugin requires no configuration by default, but it is possible to configure
9595If you need [ lightweight tags] ( https://git-scm.com/book/en/v2/Git-Basics-Tagging#_lightweight_tags ) support, you may turn on ` lightweightTags ` option in this way:
9696
9797``` javascript
98- var GitRevisionPlugin = require (' git-revision-webpack-plugin' )
98+ const { GitRevisionPlugin } = require (' git-revision-webpack-plugin' )
9999
100100module .exports = {
101101 plugins: [
@@ -111,7 +111,7 @@ module.exports = {
111111If you need branch name support, you may turn on ` branch ` option in this way:
112112
113113``` javascript
114- var GitRevisionPlugin = require (' git-revision-webpack-plugin' )
114+ const { GitRevisionPlugin } = require (' git-revision-webpack-plugin' )
115115
116116module .exports = {
117117 plugins: [
@@ -129,7 +129,7 @@ To change the default `git` command used to read the value of `COMMITHASH`.
129129This configuration is not not meant to accept arbitrary user input and it is executed by the plugin without any sanitization.
130130
131131``` javascript
132- var GitRevisionPlugin = require (' git-revision-webpack-plugin' )
132+ const { GitRevisionPlugin } = require (' git-revision-webpack-plugin' )
133133
134134module .exports = {
135135 plugins: [
@@ -147,7 +147,7 @@ To change the default `git` command used to read the value of `VERSION`.
147147This configuration is not not meant to accept arbitrary user input and it is executed by the plugin without any sanitization.
148148
149149``` javascript
150- var GitRevisionPlugin = require (' git-revision-webpack-plugin' )
150+ const { GitRevisionPlugin } = require (' git-revision-webpack-plugin' )
151151
152152module .exports = {
153153 plugins: [
@@ -165,7 +165,7 @@ To change the default `git` command used to read the value of `BRANCH`.
165165This configuration is not not meant to accept arbitrary user input and it is executed by the plugin without any sanitization.
166166
167167``` javascript
168- var GitRevisionPlugin = require (' git-revision-webpack-plugin' )
168+ const { GitRevisionPlugin } = require (' git-revision-webpack-plugin' )
169169
170170module .exports = {
171171 plugins: [
@@ -183,7 +183,7 @@ To change the default `git` command used to read the value of `LASTCOMMITDATETIM
183183This configuration is not not meant to accept arbitrary user input and it is executed by the plugin without any sanitization.
184184
185185``` javascript
186- var GitRevisionPlugin = require (' git-revision-webpack-plugin' )
186+ const { GitRevisionPlugin } = require (' git-revision-webpack-plugin' )
187187
188188module .exports = {
189189 plugins: [
0 commit comments