49 lines
1.0 KiB
TypeScript
49 lines
1.0 KiB
TypeScript
import { defineConfig } from "vite";
|
|
import vue from "@vitejs/plugin-vue";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import path from "path";
|
|
|
|
const host = process.env.TAURI_DEV_HOST;
|
|
|
|
export default defineConfig(async () => ({
|
|
plugins: [vue(), tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
clearScreen: false,
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
codemirror: [
|
|
"codemirror",
|
|
"@codemirror/lang-sql",
|
|
"@codemirror/view",
|
|
"@codemirror/state",
|
|
"@codemirror/autocomplete",
|
|
"@codemirror/theme-one-dark",
|
|
],
|
|
"sql-formatter": ["sql-formatter"],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 1420,
|
|
strictPort: true,
|
|
host: host || false,
|
|
hmr: host
|
|
? {
|
|
protocol: "ws",
|
|
host,
|
|
port: 1421,
|
|
}
|
|
: undefined,
|
|
watch: {
|
|
ignored: ["**/src-tauri/**"],
|
|
},
|
|
},
|
|
}));
|