Vendor opencode source for docker build
This commit is contained in:
36
opencode/packages/enterprise/vite.config.ts
Normal file
36
opencode/packages/enterprise/vite.config.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { defineConfig, PluginOption } from "vite"
|
||||
import { solidStart } from "@solidjs/start/config"
|
||||
import { nitro } from "nitro/vite"
|
||||
import tailwindcss from "@tailwindcss/vite"
|
||||
|
||||
const nitroConfig: any = (() => {
|
||||
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,
|
||||
baseURL: process.env.OPENCODE_BASE_URL,
|
||||
}),
|
||||
],
|
||||
server: {
|
||||
host: "0.0.0.0",
|
||||
allowedHosts: true,
|
||||
},
|
||||
worker: {
|
||||
format: "es",
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user