You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 year ago | |
---|---|---|
__tests__ | 2 years ago | |
demo | 2 years ago | |
src | 1 year ago | |
.gitignore | 2 years ago | |
.prettierrc | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 1 year ago | |
jest.config.js | 2 years ago | |
package-lock.json | 2 years ago | |
package.json | 2 years ago | |
tsconfig.json | 2 years ago |
README.md
vite-plugin-package-version
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()],
};