home-app/vite.config.js

24 lines
517 B
JavaScript
Raw Normal View History

2022-04-30 13:12:41 +00:00
import child_process from "child_process";
import legacy from "@vitejs/plugin-legacy";
2022-04-30 03:45:14 +00:00
2022-04-29 14:52:00 +00:00
/**
* @type {import('vite').UserConfig}
*/
const config = {
2022-04-30 13:12:41 +00:00
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;