vite plugin to load package version into env
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Troplo 5b5e4ccf0b
Update 'README.md'
10 months ago
__tests__ added tests 2 years ago
demo added tests 2 years ago
src Update 'src/index.ts' 10 months ago
.gitignore Initial commit 2 years ago
.prettierrc Initial commit 2 years ago
LICENSE Initial commit 2 years ago
README.md Update 'README.md' 10 months ago
jest.config.js added tests 2 years ago
package-lock.json 1.0.2 2 years ago
package.json 1.0.2 2 years ago
tsconfig.json Initial commit 2 years ago

README.md

vite-plugin-package-version

npm

Note: this plugin requires vite@^2.0.0-beta.69.

Load package version of your package.json into your vite environment.

Will inject import.meta.env.PACKAGE_VERSION and import.meta.env.BUILD_DATE with the version specified in your package.json.

Installation

npm i vite-plugin-package-version

Usage

// vite.config.js
import loadVersion from 'vite-plugin-package-version';

export default {
  plugins: [loadVersion()],
};