# vendor-version

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

Latest version **1.0.4** (published 2022-06-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install vendor-version
pnpm add vendor-version
yarn add vendor-version
bun add vendor-version
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-06-23 |
| First published | 2022-05-17 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | ada87 |
| Maintainers | ada87 |
| Keywords | webpack, plugin |

## Links

- npm: https://www.npmjs.com/package/vendor-version
- Repository: https://github.com/ada87/vendor-version
- Homepage: https://github.com/ada87/vendor-version#readme
- Issues: https://github.com/ada87/vendor-version/issues
- npm.io page: https://npm.io/package/vendor-version

## Dependencies (1)

- [webpack](https://npm.io/package/webpack.md) ^5.72.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2022-06-23
- 1.0.3 — 2022-05-27
- 1.0.2 — 2022-05-19
- 1.0.1 — 2022-05-17
- 1.0.0 — 2022-05-17

## README

# Vendor Version Plugin

English | [中文](./README_CN.md)

Vendor Vesion is a plugin for `webpack5`, shows dependencies version info by insert a comment in your compiled code.

Such as:

```javascript
/**  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

```bash
npm install --save-dev verdor-version
```

## Usage

edit your `webpack.config.js` file ：

```javascript
const VerdorVersionPlugin = require('verdor-version');

module.exports = {
    ...
    plugins: [new VerdorVersionPlugin()],
}
```

## Options

constructor support a object type param, specify some future of the comment:

| field        | description                                                                                                                                                             | default                                              |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| footer       | `boolean` the comment position, true:foot,false:head                                                                                                                    | false                                                |
| banner       | `string` custom a string in the commment, will show before the version info. <br/>**ATTENTION** this string not safe , not use like "\*\*\/" to block the commont code. | null                                                 |
| dependencies | `string[]` what dependencies version will show on the code.                                                                                                             | use `package.json` -> `dependencies` in your project |
| variable | `string` in webpack production mode, use a variable instead of comment. | "_v_v" |


Demo:

```javascript
const VerdorVersionPlugin = require('verdor-version');

module.exports = {
    ...
    plugins: [new VerdorVersionPlugin({
        banner:'My Name',
        // footer: true,
        dependencies:['lodash','react']

    })],
}
```

---
_Source: https://npm.io/package/vendor-version · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
