question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

adapter-cloudflare: only including `_app` content in `_routes.json`

See original GitHub issue

Describe the bug

The adapter should include any assets inside the client output folder instead _app only (kit.appDir).

Latest changes in kit allow plugins to emit/generate assets in the client folder: @vite-pwa/sveltekit, sitemap

The problem is here: https://github.com/sveltejs/kit/blob/master/packages/adapter-cloudflare/index.js#L42 (should include the client folder)

Reproduction

~~no, sorry, just reported from Discord here: https://discord.com/channels/937808017016119440/937973377883336704/1041084393239891988~~

https://github.com/hazre/neosvr-mod-manager/tree/fix/pwa

Logs

No response

System Info

NA

Severity

blocking all usage of SvelteKit

Additional Information

The app is using the new @vite-pwa/sveltekit plugin to add the PWA, cloudflare returns 404 for the service worker and webmanifest assets.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Rich-Harriscommented, Nov 19, 2022

Yes. Alternative this line… https://github.com/sveltejs/kit/blob/284b20bb543890e7d5a6ca99581d6eba72d9deae/packages/adapter-cloudflare/index.js#L81 …would need to lose the immutable part.

@jrf0110 is there any likelihood that we could just exclude all static assets (perhaps behind an option in the adapter), without adding them individually to the exclude array (and exceeding the 100 limit, in many cases)?

1reaction
Rich-Harriscommented, Nov 15, 2022

@tedsteen that sounds like a separate issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Routes · Cloudflare Workers docs
Routes allow users to map a URL pattern to a Worker script to enable Workers to run in front of Custom Domains or...
Read more >
Connect from WARP to a private network on Cloudflare using ...
Begin by creating a Tunnel with an associated name. This example uses the name grafana . · Create a route. Routes map a...
Read more >
Set up your first tunnel · Cloudflare Zero Trust docs
When setting up your first Cloudflare Tunnel, you have the option to create it: Remotely on the Zero Trust dashboard · Locally, using...
Read more >
Cloudflare Pages Goes Full Stack
When deploying a Pages application with functions, Pages is compiling and deploying first class Workers on your behalf. This means there is zero ......
Read more >
Deploy a Svelte site · Cloudflare Pages docs
In this guide, you will create a new Svelte application and deploy it using Cloudflare Pages. ... Include the adapter in svelte.config.js :....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found