mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 23:47:02 +08:00
AlasGG
This commit is contained in:
12
webapp/version/inject-app-version-plugin.mjs
Normal file
12
webapp/version/inject-app-version-plugin.mjs
Normal file
@@ -0,0 +1,12 @@
|
||||
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();
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user