mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-13 11:39:41 +03:00
34 lines
795 B
TypeScript
34 lines
795 B
TypeScript
import { defineConfig, PluginOption } from "vite"
|
|
import { solidStart } from "@solidjs/start/config"
|
|
import { nitro } from "nitro/vite"
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
solidStart({
|
|
middleware: "./src/middleware.ts",
|
|
}) as PluginOption,
|
|
nitro({
|
|
compatibilityDate: "2024-09-19",
|
|
preset: "cloudflare-module",
|
|
cloudflare: {
|
|
nodeCompat: true,
|
|
},
|
|
}),
|
|
],
|
|
environments: {
|
|
// Nitro copies public/ with fs.cp, which keeps the symlinks into packages/ui as links.
|
|
// Letting Vite copy it first writes real files.
|
|
client: { build: { copyPublicDir: true } },
|
|
},
|
|
server: {
|
|
allowedHosts: true,
|
|
port: 3001,
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
external: ["cloudflare:workers"],
|
|
},
|
|
minify: false,
|
|
},
|
|
})
|