0.0.5 • Published 3 years ago

release-version-webpack-plugin v0.0.5

Weekly downloads
18
License
MIT
Repository
github
Last release
3 years ago

ReleaseVersionWebpackPlugin

CI npm npm Lines

A webpack plugin for automatic log current release commit hash and version from package.json.


Feature

  • Support different Webpack & html-webpack-plugin version
    • webpack 3 & html-webpack-plugin 3
    • webpack 4 & html-webpack-plugin 3
    • webpack 5 & html-webpack-plugin 4/5
  • Support custom release log format
  • Support different type of file inject
    • .html
    • .css
    • .js

Installation

# use npm
npm i release-version-webpack-plugin

# use yarn
yarn add release-version-webpack-plugin

Usage

import ReleaseVersionWebpackPlugin from 'release-version-webpack-plugin'

config.plugins.push(new ReleaseVersionWebpackPlugin())

By default, ReleaseVersionWebpackPlugin will inject a script to your entry html like this:

<script>
console.log("env: PRODUCT", "dfae3d@2020-12-28 18:02:43")
<script>

the default format is env: ${NODE_ENV} ${latest commit hash}@${latest build time}.

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.2-0

3 years ago

0.0.1

3 years ago