From ae9bb762f00749a3d3818220d72cc0136856f0fd Mon Sep 17 00:00:00 2001 From: Simon Haugen Date: Sat, 13 Feb 2021 14:11:15 +0100 Subject: [PATCH] updated README.md --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 946741f..b62c83e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,26 @@ # vite-plugin-package-version -Plugin for vite to load package version into environment +[![npm](https://img.shields.io/npm/v/vite-plugin-package-version.svg)](https://www.npmjs.com/package/vite-plugin-package-version) + +**Note: this plugin requires `vite@^2.0.0-beta.69`**. + +Load package version of your package.json into your [vite](https://github.com/vitejs/vite) environment. + +Will inject `import.meta.env.PACKAGE_VERSION` with the version specified in your package.json. + +## Installation + +``` +npm i vite-plugin-package-version +``` + +## Usage + +```js +// vite.config.js +import loadVersion from 'vite-plugin-package-version'; + +export default { + plugins: [loadVersion()], +}; +```