Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use global Request type to prevent type errors (#70)
* Remove build.minify: true, add v3_lazyRouteDiscovery • build: { minify: true } causes variable names to be mangled in the SSR build of the app, which means that Models will have the wrong name and will wind up pointing at non-existent (or wrong) D1 tables • v3_lazyRouteDiscovery is a new default behavior for remix that doesn’t require any other changes to enable * 📝 Update remix v1 link, add --remote, grammar you need to pass the --remote flag to the newest version of wrangler’s migrations apply command in order to get it to run on the production instance of the D1 DB * 📝 Document vite.config, update worker example * 📝 Update defunct sessions doc instructions * 📝 Add handleScheduled to Getting Started doc * 📝 Mention Vite config gotcha in models doc * 📝 Update authentication doc for @superflare/remix * 📝 Update CLI docs with changes to commands * Replace local docsearch.css → @docsearch/css also, upgrade from v3.6.1 → v3.8.0 (latest) * Use global Request type for all request instances this resolves a type error that was being triggered when using handleFetch<env>(request, …) from a worker.ts script (e.g. in examples/remix-cms). the full TS error: worker.ts:17:37 - error TS2345: Argument of type 'Request<unknown, IncomingRequestCfProperties<unknown>>' is not assignable to parameter of type 'import("/Users/andrew/Projects/superflare/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workers-types/index").Request<unknown, import("/Users/andrew/Projects/superflare/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workers-types/index").Incomi...'. The types of 'clone().headers' are incompatible between these types. Property 'getAll' is missing in type 'Headers' but required in type 'import("/Users/andrew/Projects/superflare/node_modules/.pnpm/@cloudflare[email protected]/node_modules/@cloudflare/workers-types/index").Headers'. 17 return await handleFetch<Env>(request, env, ctx, config, handleRequest);
- Loading branch information