1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- import {
- defineConfig
- } from 'vite'
- import vue from '@vitejs/plugin-vue'
- import WindiCSS from 'vite-plugin-windicss'
- import Components from 'unplugin-vue-components/vite'
- import {
- ElementPlusResolver
- } from 'unplugin-vue-components/resolvers'
- import {
- resolve
- } from 'path';
- const pathResolve = (dir) => {
- return resolve(__dirname, '.', dir);
- };
- const alias = {
- '@': pathResolve('./src/'),
- '@tools': pathResolve('./src/tools'),
- '@api': pathResolve('./src/api'),
- '@com': pathResolve('./src/components'),
- '/@': pathResolve('./src/'),
- };
- export default defineConfig({
- base: process.env.ELECTRON == "true" ? './' : "./",
- resolve: {
- alias
- },
- build: {
- sourcemap: false
- },
- optimizeDeps: {
- include: ["element-plus/lib/locale/lang/zh-cn"],
- },
- plugins: [
- Components({
- resolvers: [ElementPlusResolver()],
- }),
- WindiCSS(),
- vue()
- ],
- server: {
- host: '0.0.0.0',
- open: false,
- base: "./ ",
- proxy: {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- },
- })
|