diff --git a/packages/tui-components-svelte/package.json b/packages/tui-components-svelte/package.json index 1f94dea..33f46f8 100644 --- a/packages/tui-components-svelte/package.json +++ b/packages/tui-components-svelte/package.json @@ -4,7 +4,7 @@ "description": "", "homepage": "https://github.com/timephy/tui/tree/main/tui-components-svelte#readme", "scripts": { - "clean": "rm -rf dist/ .svelte-kit/", + "clean": "rm -rf dist/ .svelte-kit/ build/", "dev": "vite dev", "build": "vite build && svelte-package", "check:publish": "pnpm run lint && pnpm run build && publint", @@ -26,7 +26,7 @@ "author": "", "license": "MIT", "devDependencies": { - "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/adapter-static": "^3.0.1", "@sveltejs/kit": "^2.0.0", "@sveltejs/package": "^2.3.1", "@sveltejs/vite-plugin-svelte": "^3.0.0", diff --git a/packages/tui-components-svelte/src/routes/+layout.ts b/packages/tui-components-svelte/src/routes/+layout.ts new file mode 100644 index 0000000..372081f --- /dev/null +++ b/packages/tui-components-svelte/src/routes/+layout.ts @@ -0,0 +1,3 @@ +export const prerender = true +export const ssr = true +export const csr = true diff --git a/packages/tui-components-svelte/src/routes/components/+page.svelte b/packages/tui-components-svelte/src/routes/components/+page.svelte index 4808f82..22ab253 100644 --- a/packages/tui-components-svelte/src/routes/components/+page.svelte +++ b/packages/tui-components-svelte/src/routes/components/+page.svelte @@ -56,5 +56,6 @@
abc
abc
+

_

diff --git a/packages/tui-components-svelte/svelte.config.js b/packages/tui-components-svelte/svelte.config.js index daa1e66..75f942c 100644 --- a/packages/tui-components-svelte/svelte.config.js +++ b/packages/tui-components-svelte/svelte.config.js @@ -1,4 +1,4 @@ -import adapter from "@sveltejs/adapter-auto" +import adapter from "@sveltejs/adapter-static" import { vitePreprocess } from "@sveltejs/vite-plugin-svelte" /** @type {import('@sveltejs/kit').Config} */ @@ -8,10 +8,12 @@ const config = { preprocess: vitePreprocess(), kit: { - // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. - // If your environment is not supported, or you settled on a specific environment, switch out the adapter. - // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter(), + adapter: adapter({ + strict: true, + fallback: "index.html", + pages: "build", + precompress: true, + }), }, } diff --git a/packages/tui-components-svelte/tsconfig.json b/packages/tui-components-svelte/tsconfig.json index 471ad31..05a015c 100644 --- a/packages/tui-components-svelte/tsconfig.json +++ b/packages/tui-components-svelte/tsconfig.json @@ -8,8 +8,7 @@ "resolveJsonModule": true, "skipLibCheck": true, "sourceMap": true, - "strict": true, - "moduleResolution": "bundler" + "strict": true } // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9d1720..4d19ef5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -66,9 +66,9 @@ importers: specifier: ^3.3.1 version: 3.3.1(svelte@5.0.0-next.138) devDependencies: - '@sveltejs/adapter-auto': - specifier: ^3.0.0 - version: 3.2.1(@sveltejs/kit@2.5.10(@sveltejs/vite-plugin-svelte@3.1.0(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12))) + '@sveltejs/adapter-static': + specifier: ^3.0.1 + version: 3.0.1(@sveltejs/kit@2.5.10(@sveltejs/vite-plugin-svelte@3.1.0(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12))) '@sveltejs/kit': specifier: ^2.0.0 version: 2.5.10(@sveltejs/vite-plugin-svelte@3.1.0(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)) @@ -561,8 +561,8 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - '@sveltejs/adapter-auto@3.2.1': - resolution: {integrity: sha512-/3xx8ZFCD5UBc/7AbyXkFF3HNCzWAp2xncH8HA4doGjoGQEN7PmwiRx4Y9nOzi4mqDqYYUic0gaIAE2khWWU4Q==} + '@sveltejs/adapter-static@3.0.1': + resolution: {integrity: sha512-6lMvf7xYEJ+oGeR5L8DFJJrowkefTK6ZgA4JiMqoClMkKq0s6yvsd3FZfCFvX1fQ0tpCD7fkuRVHsnUVgsHyNg==} peerDependencies: '@sveltejs/kit': ^2.0.0 @@ -841,7 +841,6 @@ packages: bun@1.1.9: resolution: {integrity: sha512-imtKSi5ieJYZ8H/YJIUy1xY91izXTV0iE28399vKiq3vjNaVz9/kzEHqZKDZcofYtknfnc5Izo4qaB5kpmQ+Yg==} - cpu: [arm64, x64] os: [darwin, linux, win32] hasBin: true @@ -2020,10 +2019,12 @@ packages: rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rimraf@3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} + deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true rollup@4.18.0: @@ -2722,10 +2723,9 @@ snapshots: '@sinclair/typebox@0.27.8': {} - '@sveltejs/adapter-auto@3.2.1(@sveltejs/kit@2.5.10(@sveltejs/vite-plugin-svelte@3.1.0(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))': + '@sveltejs/adapter-static@3.0.1(@sveltejs/kit@2.5.10(@sveltejs/vite-plugin-svelte@3.1.0(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))': dependencies: '@sveltejs/kit': 2.5.10(@sveltejs/vite-plugin-svelte@3.1.0(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)) - import-meta-resolve: 4.1.0 '@sveltejs/kit@2.5.10(@sveltejs/vite-plugin-svelte@3.1.0(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12)))(svelte@5.0.0-next.138)(vite@5.2.11(@types/node@20.12.12))': dependencies: