diff --git a/examples/html-demo/tsconfig.json b/examples/html-demo/tsconfig.json index 091b62bf..50b8061b 100644 --- a/examples/html-demo/tsconfig.json +++ b/examples/html-demo/tsconfig.json @@ -1,12 +1,7 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "baseUrl": ".", - "paths": { - "@vjs/html": ["../../packages/html/src"], - "@vjs/react": ["../../packages/react/src"], - "@vjs/core": ["../../packages/core/src"] - } + "baseUrl": "." }, "include": ["src"] } diff --git a/examples/html-demo/vite.config.mts b/examples/html-demo/vite.config.mts deleted file mode 100644 index 289e7f7a..00000000 --- a/examples/html-demo/vite.config.mts +++ /dev/null @@ -1,13 +0,0 @@ -import { fileURLToPath } from 'url'; - -import { defineConfig } from 'vite'; - -const __dirname = fileURLToPath(new URL('.', import.meta.url)); - -export default defineConfig({ - root: __dirname, - server: { - port: 5174, - strictPort: false, // Allow Vite to try other ports if 5174 is taken - }, -}); diff --git a/examples/html-demo/vite.config.ts b/examples/html-demo/vite.config.ts new file mode 100644 index 00000000..c9d7dbf3 --- /dev/null +++ b/examples/html-demo/vite.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'vite'; + +// https://vitejs.dev/config +export default defineConfig({ + server: { + port: 5174, + }, + optimizeDeps: { + exclude: ['@vjs/html'], + }, +}); diff --git a/examples/react-demo/tsconfig.json b/examples/react-demo/tsconfig.json index 5a9fa756..85e78073 100644 --- a/examples/react-demo/tsconfig.json +++ b/examples/react-demo/tsconfig.json @@ -3,11 +3,7 @@ "compilerOptions": { "baseUrl": ".", "jsx": "react-jsx", - "paths": { - "@vjs/react": ["../../packages/react/src"], - "@vjs/html": ["../../packages/html/src"], - "@vjs/core": ["../../packages/core/src"] - } + "jsxImportSource": "react" }, "include": ["src"] } diff --git a/examples/react-demo/vite.config.ts b/examples/react-demo/vite.config.ts index 8284bd35..6aa7b8a7 100644 --- a/examples/react-demo/vite.config.ts +++ b/examples/react-demo/vite.config.ts @@ -1,19 +1,15 @@ -import type { UserConfig } from 'vite'; +import { defineConfig } from 'vite'; import tailwindcss from '@tailwindcss/vite'; import react from '@vitejs/plugin-react'; -// https://vitejs.dev/config/ -export default { +// https://vitejs.dev/config +export default defineConfig({ plugins: [react(), tailwindcss()], server: { - host: '0.0.0.0', // Listen on any interface port: 5173, - watch: { - ignored: [], - }, }, optimizeDeps: { - exclude: ['@vjs/react'], // Don’t prebundle, keeps rebuilds fast. + exclude: ['@vjs/react'], }, -} satisfies UserConfig; +});