-
-
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
adapter-cloudflare-workers produces broken build with kit.paths.base filled with some subpath #10937
Comments
Please provide a minimal reproduction. I'm not sure how to reproduce this without the code that causes the screenshot shown. |
It seems your home page can be found at /blog//. It also causes the worker to throw an exception. Could you share the error logs if you can find them? The same thing happens for the other two known routes |
I have a suspicion the routing fixes in |
You mean that: https://github.com/sveltejs/kit/pull/8618/files ? |
No, it’s a routing fix that was only applied to adapter-cloudflare (I didn't know we had a adapter-cloudflare-workers at the time I sent the original PR) kit/packages/adapter-cloudflare/src/worker.js Lines 17 to 54 in 8c4b74c
compared to the cloudflare workers adapter which has the following bugs:
|
Describe the bug
I wan't to embed sveltekit project inside existing project (I have no access to server, that's why I stick up with CloudFlare Workers to inject my code into new routes inside existing site).
For example site.com/blog.
In svelte kit doc mentioned that there is no problem to server SvelteKit not from the root of the domain.
For that we should use kit.paths.base param.
This works like a charm when I use local env or
npm run preview
. Problems appears when I publish site to workers.wrangler.toml
The config is pretty straight forward, but on workers env it broken. It seems that there are problems with router:
![image](https://private-user-images.githubusercontent.com/1398808/278507980-aef50a47-05e9-4d29-a88a-d10d280c7e56.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMDQ5MjksIm5iZiI6MTczOTMwNDYyOSwicGF0aCI6Ii8xMzk4ODA4LzI3ODUwNzk4MC1hZWY1MGE0Ny0wNWU5LTRkMjktYTg4YS1kMTBkMjgwYzdlNTYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMjAxMDI5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGRmY2Q1Y2ZlOGE4YzE3MDI0MDVlMTY4MjRjZjRmMzc1NTNmYjk1OTA0MTFhMjBjOTI5Mzk1MTQ1MzUzYzA5MyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.G9LWY1uqFyViOWRFLm_SGytxgtrOFrrZ1COFYv-VoTE)
It seems that path not matched to registered routes inside the app.
Reproduction
setup any
base
url parameter in sveltekit config, and deploy using@sveltejs/adapter-cloudflare-workers
Logs
No response
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response
The text was updated successfully, but these errors were encountered: