StarRailCopilot/webapp/version/inject-app-version-plugin.mjs

13 lines
284 B
JavaScript
Raw Permalink Normal View History

2023-09-09 16:22:01 +00:00
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();
},
});