49 lines
1 KiB
TypeScript
49 lines
1 KiB
TypeScript
import vue from "@vitejs/plugin-vue";
|
|
import fs from "node:fs";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
build: {
|
|
cssMinify: "lightningcss",
|
|
emptyOutDir: true,
|
|
outDir: "dist",
|
|
reportCompressedSize: true,
|
|
rollupOptions: {
|
|
output: {
|
|
compact: true,
|
|
format: "esm",
|
|
validate: true,
|
|
},
|
|
},
|
|
sourcemap: false,
|
|
},
|
|
cacheDir: ".cache/vite",
|
|
clearScreen: false,
|
|
css: { transformer: "lightningcss" },
|
|
optimizeDeps: { exclude: ["sqlocal"] },
|
|
plugins: [
|
|
vue(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": Bun.fileURLToPath(new URL("./src", import.meta.url)),
|
|
},
|
|
},
|
|
server: {
|
|
allowedHosts: ["journal.site"],
|
|
cors: { origin: ["https://journal.site"] },
|
|
hmr: {
|
|
clientPort: 5173,
|
|
protocol: "wss",
|
|
},
|
|
host: "0.0.0.0",
|
|
https: {
|
|
cert: fs.readFileSync(".tls/cert.pem"),
|
|
key: fs.readFileSync(".tls/key.pem"),
|
|
},
|
|
port: 5173,
|
|
proxy: {},
|
|
strictPort: true,
|
|
},
|
|
worker: { format: "es" },
|
|
});
|