home-app/vite.config.js

24 lines
517 B
JavaScript

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;