20 lines
611 B
TypeScript
20 lines
611 B
TypeScript
import { defineConfig, type UserConfig, type ConfigEnv } from "vite";
|
|
import { default as vuePlugin } from "@vitejs/plugin-vue";
|
|
import { default as VueSetupExtend } from 'vite-plugin-vue-setup-extend';
|
|
import { resolve } from "path";
|
|
|
|
const projectPath = resolve(__dirname, "./");
|
|
const buildPath = resolve(projectPath, "./build");
|
|
|
|
async function viteConfig({ command, mode }: ConfigEnv): Promise<UserConfig> {
|
|
|
|
return {
|
|
root: projectPath,
|
|
build: {
|
|
outDir: buildPath,
|
|
},
|
|
plugins: [vuePlugin(), VueSetupExtend()]
|
|
}
|
|
}
|
|
|
|
export default defineConfig(viteConfig); |