LP_Bot/vite.config.ts

28 lines
944 B
TypeScript
Raw Permalink Normal View History

2023-11-23 08:33:21 +00:00
import react from "@vitejs/plugin-react-swc";
import path from "path";
2023-12-06 07:01:33 +00:00
import { defineConfig } from "vite";
2023-11-23 08:33:21 +00:00
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
define: {
"AppVersion": JSON.stringify(process.env.npm_package_version),
},
resolve: {
alias: [
{ find: "@", replacement: path.resolve(__dirname, "src") },
{ find: "@views", replacement: path.resolve(__dirname, "src/views") },
{ find: "@assets", replacement: path.resolve(__dirname, "src/assets") },
{ find: "@css", replacement: path.resolve(__dirname, "src/assets/css") },
{ find: "@less", replacement: path.resolve(__dirname, "src/assets/less") },
{ find: "@images", replacement: path.resolve(__dirname, "src/assets/images") },
{ find: "@components", replacement: path.resolve(__dirname, "src/components") },
],
},
publicDir: "build-templates",
build: {
outDir: "./build"
},
base: "./",
2023-12-06 07:01:33 +00:00
// envDir: "./viteEnv",
2023-11-23 08:33:21 +00:00
});