diff --git a/examples/with-svelte/packages/ui/package.json b/examples/with-svelte/packages/ui/package.json index 371519d0391ef..0729f0c36770b 100644 --- a/examples/with-svelte/packages/ui/package.json +++ b/examples/with-svelte/packages/ui/package.json @@ -3,8 +3,8 @@ "version": "0.0.0", "type": "module", "scripts": { - "dev": "svelte-package --watch --input=src", - "build": "svelte-package --input=src", + "dev": "svelte-kit sync && svelte-package --watch --input=src", + "build": "svelte-kit sync && svelte-package --input=src", "lint": "eslint .", "check-types": "svelte-check --tsconfig ./tsconfig.json" }, @@ -31,6 +31,7 @@ "devDependencies": { "@repo/eslint-config": "workspace:*", "@repo/typescript-config": "workspace:*", + "@sveltejs/kit": "^2.20.0", "@sveltejs/package": "^2.0.0", "@sveltejs/vite-plugin-svelte": "^5.0.0", "eslint": "^9.25.0", diff --git a/examples/with-svelte/packages/ui/svelte.config.js b/examples/with-svelte/packages/ui/svelte.config.js new file mode 100644 index 0000000000000..7f2cd0f46f2ac --- /dev/null +++ b/examples/with-svelte/packages/ui/svelte.config.js @@ -0,0 +1,10 @@ +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess() +}; + +export default config; diff --git a/examples/with-svelte/packages/ui/tsconfig.json b/examples/with-svelte/packages/ui/tsconfig.json index 23a5289e20571..c8ef003b3fcab 100644 --- a/examples/with-svelte/packages/ui/tsconfig.json +++ b/examples/with-svelte/packages/ui/tsconfig.json @@ -1,15 +1,10 @@ { - "extends": "@repo/typescript-config/svelte.json", + "extends": ["@repo/typescript-config/svelte.json", "./.svelte-kit/tsconfig.json"], "compilerOptions": { "declaration": true, "declarationMap": true, + "allowArbitraryExtensions": true }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "dist", - ".svelte-kit" - ] -} \ No newline at end of file + "include": ["dist", "./src/**/*.svelte", "./src/**/*.ts"], + "exclude": ["node_modules", ".svelte-kit"] +} diff --git a/examples/with-svelte/pnpm-lock.yaml b/examples/with-svelte/pnpm-lock.yaml index 55e46c757544f..c99c60a0d927c 100644 --- a/examples/with-svelte/pnpm-lock.yaml +++ b/examples/with-svelte/pnpm-lock.yaml @@ -150,6 +150,9 @@ importers: '@repo/typescript-config': specifier: workspace:* version: link:../typescript-config + '@sveltejs/kit': + specifier: ^2.20.0 + version: 2.20.0(@sveltejs/vite-plugin-svelte@5.0.3)(svelte@5.28.1)(vite@6.3.2) '@sveltejs/package': specifier: ^2.0.0 version: 2.3.11(svelte@5.28.1)(typescript@5.8.2)