mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Dax Raad <d@ironbay.co>
26 lines
642 B
TypeScript
26 lines
642 B
TypeScript
import { defineConfig, PluginOption } from "vite"
|
|
import { solidStart } from "@solidjs/start/config"
|
|
import { nitro } from "nitro/vite"
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
|
|
const nitroConfig = (() => {
|
|
const target = process.env.OPENCODE_DEPLOYMENT_TARGET
|
|
if (target === "cloudflare") {
|
|
return {
|
|
compatibilityDate: "2024-09-19",
|
|
preset: "cloudflare_module",
|
|
cloudflare: {
|
|
nodeCompat: true,
|
|
},
|
|
}
|
|
}
|
|
return {}
|
|
})()
|
|
|
|
export default defineConfig({
|
|
plugins: [tailwindcss(), solidStart() as PluginOption, nitro(nitroConfig)],
|
|
server: {
|
|
host: "0.0.0.0",
|
|
allowedHosts: true,
|
|
},
|
|
})
|