63 lines
1.3 KiB
JavaScript
63 lines
1.3 KiB
JavaScript
import Vue from "@vitejs/plugin-vue";
|
|
import AutoImport from "unplugin-auto-import/vite";
|
|
import Components from "unplugin-vue-components/vite";
|
|
import Vuetify, { transformAssetUrls } from "vite-plugin-vuetify";
|
|
import { nodePolyfills } from "vite-plugin-node-polyfills";
|
|
|
|
import { defineConfig } from "vite";
|
|
import { fileURLToPath, URL } from "node:url";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
Vue({
|
|
template: { transformAssetUrls },
|
|
}),
|
|
AutoImport({
|
|
imports: [
|
|
"vue",
|
|
{
|
|
pinia: ["defineStore", "storeToRefs"],
|
|
},
|
|
],
|
|
dts: "src/auto-imports.d.ts",
|
|
eslintrc: {
|
|
enabled: true,
|
|
},
|
|
vueTemplate: true,
|
|
}),
|
|
Components({
|
|
dts: "src/components.d.ts",
|
|
}),
|
|
Vuetify({
|
|
autoImport: true,
|
|
styles: {
|
|
configFile: "src/styles/settings.scss",
|
|
},
|
|
}),
|
|
nodePolyfills({
|
|
globals: {
|
|
Buffer: true,
|
|
},
|
|
}),
|
|
],
|
|
optimizeDeps: {
|
|
exclude: ["vuetify"],
|
|
},
|
|
define: { "process.env": {} },
|
|
resolve: {
|
|
alias: {
|
|
"@": fileURLToPath(new URL("src", import.meta.url)),
|
|
},
|
|
extensions: [".js", ".json", ".jsx", ".mjs", ".ts", ".tsx", ".vue"],
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
"/ws": {
|
|
target: "ws://localhost:8097",
|
|
ws: "true",
|
|
},
|
|
},
|
|
},
|
|
});
|