Skip to content

Commit 9e46c56

Browse files
authored
fix: wc dist overwrite (#63)
1 parent c7ad29e commit 9e46c56

4 files changed

Lines changed: 77 additions & 1 deletion

File tree

pnpm-lock.yaml

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdks/typescript/client/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,18 @@
3434
"@vitejs/plugin-react": "^4.0.0",
3535
"esbuild": "^0.25.5",
3636
"jsdom": "^22.0.0",
37+
"rimraf": "^6.0.1",
3738
"typescript": "^5.0.0",
3839
"vite": "^5.0.0",
3940
"vite-plugin-dts": "^3.6.0",
4041
"vitest": "^1.0.0"
4142
},
4243
"scripts": {
4344
"prepublishOnly": "pnpm run build",
44-
"build": "pnpm run bundle:iframe && tsc && vite build && pnpm run build:wc",
45+
"build": "pnpm run clean && pnpm run bundle:iframe && tsc && vite build && pnpm run build:wc",
4546
"build:wc": "vite build --config vite.config.wc.ts",
4647
"bundle:iframe": "node scripts/bundle-iframe.js",
48+
"clean": "rimraf dist",
4749
"dev": "pnpm run bundle:iframe && vite",
4850
"test": "vitest run",
4951
"test:watch": "vitest watch",

sdks/typescript/client/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default defineConfig({
1313
}) as any,
1414
],
1515
build: {
16+
emptyOutDir: false,
1617
lib: {
1718
entry: path.resolve(__dirname, 'src/index.ts'),
1819
name: 'McpUiClient',

sdks/typescript/client/vite.config.wc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import path from 'path';
55
export default defineConfig({
66
plugins: [react()],
77
build: {
8+
emptyOutDir: false,
89
outDir: 'dist',
910
lib: {
1011
entry: path.resolve(__dirname, 'src/components/UIResourceRendererWC.tsx'),

0 commit comments

Comments
 (0)