import react from "@vitejs/plugin-react-swc";
import path from "path";
import { defineConfig } from "vite";

// https://vitejs.dev/config/
export default defineConfig({
	server: { fs: { strict: false } },
	plugins: [
		react()
	],
	define: {
		"AppVersion": JSON.stringify(process.env.npm_package_version),
	},
	resolve: {
		alias: [
			{ find: "@", replacement: path.resolve(__dirname, "src") },
		],
	},
	publicDir: "build-templates",
	build: {
		outDir: "./build"
	},
	base: "./",
	envDir: "./viteEnv",
});