28 lines
941 B
TypeScript
28 lines
941 B
TypeScript
|
import { defineConfig } from "vite";
|
||
|
import react from "@vitejs/plugin-react-swc";
|
||
|
import path from "path";
|
||
|
|
||
|
// 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: "./",
|
||
|
envDir: "./viteEnv",
|
||
|
});
|