feat: configure project for Cloudflare Pages static build
Switch to @sveltejs/adapter-static and set output to /out. #VERCEL_SKIP Co-authored-by: Jeff Emmett <46964190+Jeff-Emmett@users.noreply.github.com>
This commit is contained in:
parent
bdaddd99ab
commit
754fd0c81a
|
|
@ -17,11 +17,12 @@
|
|||
"src": "latest",
|
||||
"svelte": "^5.0.0",
|
||||
"tmux": "latest",
|
||||
"@sveltejs/adapter-auto": "^6.0.0",
|
||||
"@sveltejs/adapter-static": "latest",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.0",
|
||||
"@tailwindcss/vite": "^4.0.0",
|
||||
"@sveltejs/kit": "^2.16.0",
|
||||
"vite": "^6.2.6",
|
||||
"@sveltejs/adapter-auto": "^6.0.0",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-svelte": "^3.3.3",
|
||||
"prettier-plugin-tailwindcss": "^0.6.11",
|
||||
|
|
|
|||
|
|
@ -11,6 +11,9 @@ importers:
|
|||
'@sveltejs/adapter-auto':
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0(@sveltejs/kit@2.16.0(@sveltejs/vite-plugin-svelte@5.0.0(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))
|
||||
'@sveltejs/adapter-static':
|
||||
specifier: latest
|
||||
version: 3.0.10(@sveltejs/kit@2.16.0(@sveltejs/vite-plugin-svelte@5.0.0(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))
|
||||
'@sveltejs/kit':
|
||||
specifier: ^2.16.0
|
||||
version: 2.16.0(@sveltejs/vite-plugin-svelte@5.0.0(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2))
|
||||
|
|
@ -375,6 +378,11 @@ packages:
|
|||
peerDependencies:
|
||||
'@sveltejs/kit': ^2.0.0
|
||||
|
||||
'@sveltejs/adapter-static@3.0.10':
|
||||
resolution: {integrity: sha512-7D9lYFWJmB7zxZyTE/qxjksvMqzMuYrrsyh1f4AlZqeZeACPRySjbC3aFiY55wb1tWUaKOQG9PVbm74JcN2Iew==}
|
||||
peerDependencies:
|
||||
'@sveltejs/kit': ^2.0.0
|
||||
|
||||
'@sveltejs/kit@2.16.0':
|
||||
resolution: {integrity: sha512-S9i1ZWKqluzoaJ6riYnEdbe+xJluMTMkhABouBa66GaWcAyCjW/jAc0NdJQJ/DXyK1CnP5quBW25e99MNyvLxA==}
|
||||
engines: {node: '>=18.13'}
|
||||
|
|
@ -1128,6 +1136,10 @@ snapshots:
|
|||
'@sveltejs/kit': 2.16.0(@sveltejs/vite-plugin-svelte@5.0.0(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2))
|
||||
import-meta-resolve: 4.2.0
|
||||
|
||||
'@sveltejs/adapter-static@3.0.10(@sveltejs/kit@2.16.0(@sveltejs/vite-plugin-svelte@5.0.0(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))':
|
||||
dependencies:
|
||||
'@sveltejs/kit': 2.16.0(@sveltejs/vite-plugin-svelte@5.0.0(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2))
|
||||
|
||||
'@sveltejs/kit@2.16.0(@sveltejs/vite-plugin-svelte@5.0.0(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2)))(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2))':
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte': 5.0.0(svelte@5.0.0)(vite@6.2.6(jiti@2.6.1)(lightningcss@1.30.2))
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
export const prerender = true
|
||||
|
|
@ -1,18 +1,24 @@
|
|||
import adapter from '@sveltejs/adapter-auto';
|
||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||
import adapter from "@sveltejs/adapter-static"
|
||||
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte"
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
const config = {
|
||||
// Consult https://svelte.dev/docs/kit/integrations
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
// Consult https://svelte.dev/docs/kit/integrations
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
|
||||
kit: {
|
||||
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
|
||||
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
||||
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
|
||||
adapter: adapter()
|
||||
}
|
||||
};
|
||||
kit: {
|
||||
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
|
||||
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
||||
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
|
||||
adapter: adapter({
|
||||
pages: "out",
|
||||
assets: "out",
|
||||
fallback: undefined,
|
||||
precompress: false,
|
||||
strict: true,
|
||||
}),
|
||||
},
|
||||
}
|
||||
|
||||
export default config;
|
||||
export default config
|
||||
|
|
|
|||
Loading…
Reference in New Issue