Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-package-version

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-package-version - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json

@@ -5,3 +5,3 @@ {

"description": "vite plugin to load package version into env",
"version": "0.0.1",
"version": "0.0.2",
"keywords": [

@@ -8,0 +8,0 @@ "vite",

# 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()],
};
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc