Skip to content
This repository was archived by the owner on Apr 27, 2024. It is now read-only.

sws2apps/vite-plugin-package-version

This branch is 254 commits ahead of, 2 commits behind smnhgn/vite-plugin-package-version:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8636e91 · Apr 27, 2024
Apr 4, 2024
Dec 18, 2022
Oct 18, 2023
Dec 18, 2022
Feb 13, 2021
Mar 7, 2023
Apr 25, 2023
Feb 13, 2021
Feb 1, 2024
Dec 18, 2022
Dec 18, 2022
Dec 18, 2022
Apr 27, 2024
Dec 18, 2022
Dec 18, 2022
Apr 4, 2024
Apr 4, 2024
Dec 18, 2022
Feb 13, 2021

Repository files navigation

Vite Plugin to Display Package Version

DISCLAIMER: As the original package from smnhgn/vite-plugin-package-version now supports ESM, we will be soon deprecating this package.

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

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

Installation

npm i @sws2apps/vite-plugin-package-version

Usage

// vite.config.js
import { defineConfig } from 'vite';
import { loadVersion } from '@sws2apps/vite-plugin-package-version';

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

Note

This repo is taken from vite-plugin-package-version by Simon Haugen with only some minor edits. Thanks to Simon for the original repo.