This commit is contained in:
2022-04-30 11:45:14 +08:00
parent 02e12e1afd
commit f161703032
6 changed files with 588 additions and 5 deletions

View File

@ -1,4 +1,6 @@
import child_process from "child_process"
import legacy from '@vitejs/plugin-legacy';
/**
* @type {import('vite').UserConfig}
*/
@ -6,6 +8,12 @@ const config = {
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