Skip to content
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 doesn't understand kit.paths.base #2843

Closed
tv42 opened this issue Nov 19, 2021 · 0 comments · Fixed by #4448
Closed

adapter-cloudflare doesn't understand kit.paths.base #2843

tv42 opened this issue Nov 19, 2021 · 0 comments · Fixed by #4448
Labels
bug Something isn't working paths.base bugs relating to `config.kit.paths.base` pkg:adapter-cloudflare
Milestone

Comments

@tv42
Copy link

tv42 commented Nov 19, 2021

Describe the bug

I wish to use multiple SvelteKit apps on one domain, hence I must use base to separate them, to avoid each one of them thinking they are special and get to own the URL /_app.

If I set svelte.config.js config.kit.paths.base = '/foo', and use the @sveltejs/adapter-cloudflare adapter, npx wrangler@beta pages dev .svelte-kit/cloudflare/ results in it not finding the assets.

It seems SvelteKit assumes that the assets are served with base as a prefix (that is, file _app at the root of the static files is found by the browser at ${base}/_app), while the adapter never considers the value of base.

Reproduction

(sorry, not yet done)

Logs

No response

System Info

System:
    OS: Linux 5.14 NixOS 21.11 (Porcupine) 21.11 (Porcupine)
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 34.80 GB / 62.61 GB
    Container: Yes
    Shell: 5.1.8 - /nix/store/xdxv22yb7qnjfyf997r9fx804761z14c-bash-interactive-5.1-p8/bin/bash
  Binaries:
    Node: 16.13.0 - /nix/store/26lslfmvwyhspppbinznh111fyaxx62z-nodejs-16.13.0/bin/node
    npm: 8.1.0 - /nix/store/26lslfmvwyhspppbinznh111fyaxx62z-nodejs-16.13.0/bin/npm
  Browsers:
    Firefox: 94.0.1
  npmPackages:
    @sveltejs/adapter-cloudflare: ^1.0.0-next.2 => 1.0.0-next.2
    @sveltejs/kit: next => 1.0.0-next.191
    svelte: ^3.34.0 => 3.44.0

Severity

serious, but I can work around it

Additional Information

No response

hmnd added a commit to hmnd/svelte-kit that referenced this issue Mar 24, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- add base path to dest for builder.writeStatic, builder.writeClient, builder.writePrerendered
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Mar 24, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Mar 25, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Mar 25, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Apr 9, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
@Rich-Harris Rich-Harris added bug Something isn't working paths.base bugs relating to `config.kit.paths.base` labels Apr 26, 2022
@Rich-Harris Rich-Harris added this to the 1.0 milestone Apr 26, 2022
hmnd added a commit to hmnd/svelte-kit that referenced this issue Apr 27, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Apr 27, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Jul 22, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Jul 22, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Jul 22, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
@Rich-Harris Rich-Harris modified the milestones: 1.0, post-1.0 Aug 27, 2022
hmnd added a commit to hmnd/svelte-kit that referenced this issue Sep 2, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Sep 2, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Sep 2, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Sep 16, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.prefix and builder.getAppPrefixDirectory()
- adapter-cloudflare*: use manifest.prefix instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Sep 29, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.appPath and builder.getAppPath()
- adapter-cloudflare*: use manifest.appPath instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
hmnd added a commit to hmnd/svelte-kit that referenced this issue Sep 30, 2022
fixes sveltejs#4442, fixes sveltejs#2843

- add manifest.appPath and builder.getAppPath()
- adapter-cloudflare*: use manifest.appPath instead of manifest.appDir
- adapter-netlify: use prefixed appDir for cache headers
- adapter-vercel: use prefixed appDir for routes.json
- adapter-cloudflare, adapter-cloudflare-workers, adapter-netlify: write static assets to "$dest/$base"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working paths.base bugs relating to `config.kit.paths.base` pkg:adapter-cloudflare
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants