diff --git a/vite.config.ts b/vite.config.ts index 01f856844..9ec1c48ad 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -11,6 +11,10 @@ export default defineConfig({ appRoot: "./docs", extensions: ["mdx", "md"], server: { + preset: "cloudflare", + rollupConfig: { + external: ["__STATIC_CONTENT_MANIFEST", "node:async_hooks"] + }, prerender: { crawlLinks: true } diff --git a/wrangler.toml b/wrangler.toml index d48491ea0..13f12b8c3 100644 --- a/wrangler.toml +++ b/wrangler.toml @@ -1,10 +1,15 @@ name = "solid-start" -compatibility_date = "2022-08-05" +compatibility_date = "2022-09-10" account_id = "fa2a5e3787deead800c822a0e1171763" zone_id = "9258b29d3b22bdba0666469e82d18225" -main = "./dist/server.js" +main = "./.output/server/index.mjs" type = "javascript" route = "start.solidjs.com/*" +compatibility_flags = [ "nodejs_compat" ] + +rules = [ + { type = "ESModule", globs = ["**/*.js", "**/*.mjs"]}, +] [site] -bucket = "./dist/public" \ No newline at end of file +bucket = ".output/public" \ No newline at end of file