Skip to content

Commit

Permalink
Add cloudflare pages adapter to svelte config
Browse files Browse the repository at this point in the history
  • Loading branch information
xuxey committed Aug 20, 2023
1 parent d586c62 commit 267d488
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@iconify/svelte": "^3.1.3",
"@playwright/test": "^1.28.1",
"@sveltejs/adapter-auto": "^1.0.0",
"@sveltejs/adapter-cloudflare": "^2.3.2",
"@sveltejs/kit": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
Expand Down
9 changes: 7 additions & 2 deletions svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import adapter from '@sveltejs/adapter-auto';
import adapter from '@sveltejs/adapter-cloudflare';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/kit').Config} */
Expand All @@ -8,7 +8,12 @@ const config = {
preprocess: vitePreprocess(),

kit: {
adapter: adapter()
adapter: adapter({
routes: {
include: ['/*'],
exclude: ['<all>']
}
})
}
};

Expand Down
29 changes: 28 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,11 @@
dependencies:
tslib "^2.5.0"

"@cloudflare/workers-types@^4.20230404.0":
version "4.20230814.0"
resolved "https://registry.yarnpkg.com/@cloudflare/workers-types/-/workers-types-4.20230814.0.tgz#7aadd4f600b1cf772a26160bd5ea836fa2aa42f6"
integrity sha512-+jHiGjZg2UpULZSSHmHLqUG45TLg1s+uppSMlGvMn0u/xyFsRX9HX6b8Ydg/oHSp3jfSuPtX05GSvtgRAmrWTg==

"@esbuild/[email protected]":
version "0.18.20"
resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622"
Expand Down Expand Up @@ -1221,6 +1226,15 @@
dependencies:
import-meta-resolve "^2.2.0"

"@sveltejs/adapter-cloudflare@^2.3.2":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@sveltejs/adapter-cloudflare/-/adapter-cloudflare-2.3.2.tgz#000b8376fe9205a0ca58bc8314f1cd3ccc5f5ed0"
integrity sha512-BpgFmVJInF2D0Uo41gJtvYyTiZ6P/xkfrQSqPHQOGYsjvFeW+1AjX/8MPIJ3VJyvbVgyRaVKMBsXWHADbAYatQ==
dependencies:
"@cloudflare/workers-types" "^4.20230404.0"
esbuild "^0.18.11"
worktop "0.8.0-next.15"

"@sveltejs/kit@^1.0.0":
version "1.22.4"
resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-1.22.4.tgz#466e8521d96ea9e3a55d36b0fb843b635ba384d7"
Expand Down Expand Up @@ -1642,7 +1656,7 @@ es6-promise@^3.1.2:
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613"
integrity sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==

esbuild@^0.18.10:
esbuild@^0.18.10, esbuild@^0.18.11:
version "0.18.20"
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6"
integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==
Expand Down Expand Up @@ -2414,6 +2428,11 @@ readdirp@~3.6.0:
dependencies:
picomatch "^2.2.1"

regexparam@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/regexparam/-/regexparam-2.0.1.tgz#c912f5dae371e3798100b3c9ce22b7414d0889fa"
integrity sha512-zRgSaYemnNYxUv+/5SeoHI0eJIgTL/A2pUtXUPLHQxUldagouJ9p+K6IbIZ/JiQuCEv2E2B1O11SjVQy3aMCkw==

resolve-from@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
Expand Down Expand Up @@ -2796,6 +2815,14 @@ which@^2.0.1:
dependencies:
isexe "^2.0.0"

[email protected]:
version "0.8.0-next.15"
resolved "https://registry.yarnpkg.com/worktop/-/worktop-0.8.0-next.15.tgz#f91d4a686fe43b813fbfd49bd3d4566dcddd4bd4"
integrity sha512-0ycNO52P6nVwsjr1y20zuf0nqJatAb8L7MODBfQIxbxndHV5O4s50oZZMHWhJG1RLpHwbK0Epq8aaQK4E2GlgQ==
dependencies:
mrmime "^1.0.0"
regexparam "^2.0.0"

wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
Expand Down

0 comments on commit 267d488

Please sign in to comment.