1.0.3 • Published 2 years ago

vendor-version v1.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

Vendor Version Plugin

English | 中文

Vendor Vesion is a plugin for webpack5, shows dependencies version info by insert a comment in your compiled code.

Such as:

/**  Your Name build at 2022-05-17 14:57:45 ,  version info : {"react":"16.8.0","lodash":"4.17.21"} */
// ... you compiled code here

Install

npm install --save-dev verdor-version

Usage

edit your webpack.config.js file :

const VerdorVersionPlugin = require('verdor-version');

module.exports = {
    ...
    plugins: [new VerdorVersionPlugin()],
}

Options

constructor support a object type param, specify some future of the comment:

fielddescriptiondefault
footerboolean the comment position, true:foot,false:headfalse
bannerstring custom a string in the commment, will show before the version info. ATTENTION this string not safe , not use like "**\/" to block the commont code.null
dependenciesstring[] what dependencies version will show on the code.use package.json -> dependencies in your project
variablestring in webpack production mode, use a variable instead of comment."_v_v"

Demo:

const VerdorVersionPlugin = require('verdor-version');

module.exports = {
    ...
    plugins: [new VerdorVersionPlugin({
        banner:'My Name',
        // footer: true,
        dependencies:['lodash','react']

    })],
}
1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago