🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

build-info-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-info-webpack-plugin

Expose build specific information in global variables for debugging.

1.0.2
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

build-info-webpack-plugin

Expose build specific information in global variables for debugging.

NPM Version

Install

$ npm install build-info-webpack-plugin

Usage

webpack.config.js

const BuildInfoPlugin = require('build-info-webpack-plugin');

module.exports = {
    plugins: [BuildInfoPlugin]
};

package.json

This plugin stores the latest build number in package.json so that it can be incremented upon subsequent builds. If the buildNumber property does not exist, package.json will not be modified.

{
  ...
  "buildNumber": 0,
  ...
}

src/js/app.js

console.log(__BUILD_NUMBER__); // 1
console.log(__BUILD_UUID__); // eeabc64a-43d2-4284-8684-2e75a151e3af
console.log(__BUILD_DATE__); // 11/16/2020, 1:21:26 AM
console.log(__BUILD_COMMIT_HASH__); // 87326daf059935dd6f078700261714de413342d3

FAQs

Package last updated on 05 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts