From 8dcf27399ca7277b81fd8bcc71cd3141056b0050 Mon Sep 17 00:00:00 2001 From: lbo728 Date: Sun, 19 Apr 2026 23:52:29 +0900 Subject: [PATCH 1/2] fix: alias mobile source in vite example --- examples/with-vite/vite.config.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples/with-vite/vite.config.ts b/examples/with-vite/vite.config.ts index fabde1a8..969f92ea 100644 --- a/examples/with-vite/vite.config.ts +++ b/examples/with-vite/vite.config.ts @@ -1,6 +1,17 @@ +import path from 'node:path'; +import { fileURLToPath } from 'node:url'; + import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; +const __dirname = path.dirname(fileURLToPath(import.meta.url)); + export default defineConfig({ plugins: [react()], + resolve: { + alias: { + // Use source directly so the example app can run without prebuilding workspace packages. + '@react-simplikit/mobile': path.resolve(__dirname, '../../packages/mobile/src/index.ts'), + }, + }, }); From 2c08a797901d5b7848b0cc1e38e480c93eab77ae Mon Sep 17 00:00:00 2001 From: lbo728 Date: Tue, 21 Apr 2026 23:00:58 +0900 Subject: [PATCH 2/2] fix: prebuild workspace packages before running vite example --- examples/with-vite/vite.config.ts | 11 ----------- package.json | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/examples/with-vite/vite.config.ts b/examples/with-vite/vite.config.ts index 969f92ea..fabde1a8 100644 --- a/examples/with-vite/vite.config.ts +++ b/examples/with-vite/vite.config.ts @@ -1,17 +1,6 @@ -import path from 'node:path'; -import { fileURLToPath } from 'node:url'; - import react from '@vitejs/plugin-react'; import { defineConfig } from 'vite'; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - export default defineConfig({ plugins: [react()], - resolve: { - alias: { - // Use source directly so the example app can run without prebuilding workspace packages. - '@react-simplikit/mobile': path.resolve(__dirname, '../../packages/mobile/src/index.ts'), - }, - }, }); diff --git a/package.json b/package.json index fbf1677a..7bc1eff1 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "scripts": { "clean": "rimraf ./coverage ./node_modules", "clean:all": "yarn clean && yarn workspaces foreach -Ap run clean", - "example:vite": "yarn workspace with-vite dev", + "example:vite": "yarn build && yarn workspace with-vite dev", "example:next": "yarn workspace with-nextjs dev", "scaffold": "tsx .scripts/index.ts scaffold", "changeset": "changeset",