Skip to content

Commit d237cdc

Browse files
committed
refactor(example): consume the published library artifact
Reverts the source-resolution alias. The demo now builds the library first and bundles its published `dist/` output, so a green deploy proves that what npm consumers will install actually resolves and builds end to end. The library is still verified independently in CI; this just makes the demo deploy reflect the same artifact consumers see.
1 parent 67196ae commit d237cdc

3 files changed

Lines changed: 2 additions & 16 deletions

File tree

apps/example/tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
"isolatedModules": true,
1717
"verbatimModuleSyntax": true,
1818
"skipLibCheck": true,
19-
"jsx": "react-jsx",
20-
"paths": {
21-
"react-json-logic": ["../../packages/react-json-logic/src/index.ts"]
22-
}
19+
"jsx": "react-jsx"
2320
},
2421
"include": ["src", "vite.config.ts"]
2522
}

apps/example/vite.config.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
import { fileURLToPath } from "node:url";
21
import react from "@vitejs/plugin-react";
32
import { defineConfig } from "vite-plus";
43

54
export default defineConfig({
65
plugins: [react()],
7-
resolve: {
8-
alias: {
9-
// Resolve the workspace library to its TypeScript source so the demo
10-
// tracks the latest code without needing a prior `vp pack` build. The
11-
// published library is built independently for npm consumers.
12-
"react-json-logic": fileURLToPath(
13-
new URL("../../packages/react-json-logic/src/index.ts", import.meta.url),
14-
),
15-
},
16-
},
176
build: {
187
outDir: "dist",
198
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "module",
55
"scripts": {
66
"build": "pnpm --filter react-json-logic run build",
7-
"build:example": "pnpm --filter @react-json-logic/example run build",
7+
"build:example": "pnpm --filter react-json-logic run build && pnpm --filter @react-json-logic/example run build",
88
"dev:example": "pnpm --filter @react-json-logic/example run dev",
99
"preview:example": "pnpm --filter @react-json-logic/example run preview",
1010
"test": "pnpm -r run test",

0 commit comments

Comments
 (0)