Additionally is there any ways to get development closer to the deployment target? If you follow the guides for "build from scratch" and then the hosting guide for pages, you end up with e.g. "node:fs" as an import which doesn't seem to fail when running npm dev
I am looking to do the same, but I think it'll be easier once Vinxi is gone. Start will just be a Vite plugin, and Cloudflare also has a Workers Vite plugin to make things easier
Did somebody actually managed to get a deployment to CF Workers done? We are looking into that because we want to fully control the deployment (to certain envs via GH actions)
How the heck does it work in local for you, if a) not all used packages are declared in the package.json and b) the bindings locally seem to be a promise, which is not awaited? Sample above without changing that is not working for me. After changes it seems fine, but has still a few type errors based on the settings it ships with
error during build: Error: Cannot resolve "tanstack-start-server-fn-manifest:v" from "/Users/kevinminh/Developer/tanstack-start-template/node_modules/.pnpm/@tanstack+start-server-core@1.121.12/node_modules/@tanstack/start-server-core/dist/esm/loadVirtualModule.js" and e
/tmp/tanstack-start-cloudflare-workers (base) -> npm run build
tanstack-start-cloudflare-workers@1.0.0 build vite build
vite v6.3.5 building for production... Generated route tree in 207ms ✓ 130 modules transformed. .tanstack/start/build/client-dist/.vite/manifest.json 1.19 kB │ gzip: 0.30 kB .tanstack/start/build/client-dist/assets/index-BObhGw7g.js 0.13 kB │ gzip: 0.13 kB .tanstack/start/build/client-dist/assets/teste-DaZjm9bz.js 0.30 kB │ gzip: 0.22 kB .tanstack/start/build/client-dist/assets/deferred-CffD8pO0.js 0.34 kB │ gzip: 0.25 kB .tanstack/start/build/client-dist/assets/main-Bakroip1.js 276.09 kB │ gzip: 88.38 kB ✓ built in 2.21s vite v6.3.5 building SSR bundle for production... "H3Error", "MIMES", "callNodeListener", "createApp", "createAppEventHandler", "createError", "createEvent", "createRouter", "sanitizeStatusMessage", "serveStatic", "splitCookiesString", "toEventHandler", "toNodeListener", "toPlainHandler", "toWebHandler" and "useBase" are imported from external module "h3" but never used in "node_modules/@tanstack/start-server-core/dist/esm/h3.js" and "nodemodules/@tanstack/start-server-core/dist/esm/index.js". ✓ 56 modules transformed. ✓ built in 397ms Generated public .output/public nitro 1:21:30 PM [nitro 1:21:31 PM] Building Nitro Server (preset: cloudflare-module, compatibility date: 2024-11-13) Nitro Server built nitro 1:21:39 PM ├─ .output/server/chunks//_tanstack-start-manifest_v-B6Oaf-jF.mjs (562 B) (317 B gzip) ,........ Σ Total size: 564 kB (167 kB gzip) You can preview this build using npx wrangler --cwd .output/ dev nitro 1:21:39 PM You can deploy this build using npx wrangler --cwd .output/ deploy nitro 1:21:39 PM [nitro 1:21:39 PM] Client and Server bundles for TanStack Start have been successfully built.