sk-matrix-project/app/wails/frontend/vite.config.js
2023-07-16 04:26:30 +08:00

30 lines
858 B
JavaScript

import {defineConfig} from "vite";
import vuePlugin from "@vitejs/plugin-vue";
import vueJsx from '@vitejs/plugin-vue-jsx';
import Components from 'unplugin-vue-components/vite';
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
import path from "path"
import wailsPlugin from "./wails-plugin";
export default defineConfig({
plugins: [
vuePlugin(),
vueJsx(),
// 按需引入NaiveUi且自动创建组件声明
Components({
dts: true,
resolvers: [ElementPlusResolver()],
}),
wailsPlugin({
excludeUrls: [
"/s/.*"
]
})
],
resolve: {
alias: {
"frontend": path.resolve(__dirname, "./"),
"src": path.resolve(__dirname, "./src")
}
}
})