1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2025-12-16 22:05:12 +00:00
ArisuAutoSweeper/webapp/version/inject-app-version-plugin.mjs
2023-11-01 15:33:35 +08:00

13 lines
284 B
JavaScript

import {getVersion} from './getVersion.mjs';
/**
* Somehow inject app version to vite build context
* @return {import('vite').Plugin}
*/
export const injectAppVersion = () => ({
name: 'inject-version',
config: () => {
process.env.VITE_APP_VERSION = getVersion();
},
});