How to use the plug-in git-revision-webpack-plugin in nuxt and how to configure it?

nuxt  git-revision-webpack-plugin
Nov.14,2021

git-revision-webpack-plugin is a plug-in based on webpack. Its main function is to obtain the current git version number and branch information.
you need to install it in the project before using it: npm install-- save-dev git-revision-webpack-plugin
and then configure it in the configuration file nuxt.config.js of the nuxt project

.
 const GitRevisionPlugin = require('git-revision-webpack-plugin');
 const gitRevisionPlugin = new GitRevisionPlugin();
 const webpack = require('webpack');
 build: {
    plugins: [
      new webpack.DefinePlugin({
        'process.VERSION': JSON.stringify(gitRevisionPlugin.version()),
        'process.COMMITHASH': JSON.stringify(gitRevisionPlugin.commithash()),
        'process.BRANCH': JSON.stringify(gitRevisionPlugin.branch()),
      }),
    ],
  },
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f4da-2c477.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f4da-2c477.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?