-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(cloudflare): optimize Cache usage; strict TS source #4453
Conversation
🦋 Changeset detectedLatest commit: c0724b2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Raised internally – i think the Pages application is misconfigured. It has:
but that output directory doesnt exist when run locally. True for the default branch too |
CI is passing. Pages app seems unrelated |
The
...which makes me think it is related to this PR |
Ok so then it must be a resolution thing? Because running build w/o the But yea, can now reproduce if I repeat with |
Ah. Fails because the default template is built from within the |
Of course, that makes sense. In other adapters, we solve this problem by bundling earlier. We could do that here: #4473 |
* bundle worktop * build on prepublishOnly * Update packages/adapter-cloudflare/tsconfig.json * update builder file paths Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM but I'll confess I don't really understand why we need this to be a .ts
file. I get that it doesn't make a huge difference seeing as we're bundling with esbuild, but I think there's probably some value in using .js
consistently across the entire repo, rather than introducing an exception. Opened #4474
I don't really care about |
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Rely on the Cache API sooner within
adapter-cloudflare
. Makes use ofworktop
for all Cache operations, which safely writes aResponse
into the Cache only when permitted.Also converted the
_worker.ts
file to TypeScript for strict type checking, which is doable since we build withesbuild
anyway.Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpx changeset
and following the prompts. All changesets should bepatch
until SvelteKit 1.0