Update
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-04-30 21:12:41 +08:00
parent 1137c36987
commit 9bc4b7c43e
10 changed files with 612 additions and 519 deletions

View File

@ -1,20 +1,23 @@
import child_process from "child_process"
import legacy from '@vitejs/plugin-legacy';
import child_process from "child_process";
import legacy from "@vitejs/plugin-legacy";
/**
* @type {import('vite').UserConfig}
*/
const config = {
base: './',
define: {
'__APP_VERSION': child_process.execSync('git rev-parse --short HEAD').toString().replace("\n",""),
'__APP_BUILD_TIME': Math.floor(Date.now() / 1000),
},
plugins: [
legacy({
targets: ['ie >= 11'],
additionalLegacyPolyfills: ['regenerator-runtime/runtime']
})
]
}
export default config
base: "./",
define: {
__APP_VERSION: child_process
.execSync("git rev-parse --short HEAD")
.toString()
.replace("\n", ""),
__APP_BUILD_TIME: Math.floor(Date.now() / 1000),
},
plugins: [
legacy({
targets: ["ie >= 11"],
additionalLegacyPolyfills: ["regenerator-runtime/runtime"],
}),
],
};
export default config;