Portfolio/vite.config.ts
Matthew L McPeak 4ee81a3ab1
All checks were successful
ci / build (push) Successful in 16s
ci / publish (push) Successful in 17s
Inital Commit
2026-06-18 11:56:32 -04:00

25 lines
656 B
TypeScript

import { fileURLToPath, URL } from "node:url";
import { defineConfig, loadEnv } from "vite";
import vue from "@vitejs/plugin-vue";
import vueDevTools from "vite-plugin-vue-devtools";
// https://vite.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "VITE");
const baseURL = fileURLToPath(new URL("./src", import.meta.url));
return {
define: {
API_URL: JSON.stringify(env.VITE_API_URL ?? ""),
API_KEY: JSON.stringify(env.VITE_API_KEY ?? ""),
},
plugins: [vue(), vueDevTools()],
resolve: {
alias: {
"@": baseURL,
"~": baseURL,
},
},
};
});