Skip to content

Commit ab7dddd

Browse files
committed
fix: build hydration as a browser library
1 parent bf0fed5 commit ab7dddd

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

packages/hydration/hydration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { AsyncFrameworkFn, FrameworkFn, Component, AsyncComponent, Props, Slots } from './types'
2-
export { Framework, Props, Slots } from './types'
2+
export type { Framework, Props, Slots } from './types'
33

44
const findById = (id: string) =>
55
document.getElementById(id) || console.error(`Missing #${id}, could not mount island.`)

packages/hydration/package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@
1919
"island.svelte"
2020
],
2121
"type": "module",
22-
"types": "dist/hydration.d.mts",
22+
"types": "dist/hydration.d.ts",
2323
"exports": {
24-
".": "./dist/hydration.mjs",
25-
"./preact": "./dist/preact.mjs",
26-
"./solid": "./dist/solid.mjs",
27-
"./svelte": "./dist/svelte.mjs",
28-
"./vanilla": "./dist/vanilla.mjs",
29-
"./vue": "./dist/vue.mjs",
24+
".": "./dist/hydration.js",
25+
"./preact": "./dist/preact.js",
26+
"./solid": "./dist/solid.js",
27+
"./svelte": "./dist/svelte.js",
28+
"./vanilla": "./dist/vanilla.js",
29+
"./vue": "./dist/vue.js",
3030
"./dist/*": "./dist/*",
3131
"./package.json": "./package.json"
3232
},
3333
"scripts": {
34-
"dev": "vp pack hydration.ts preact.ts vue.ts vanilla.ts solid.ts svelte.ts --target node20 --watch",
35-
"build": "vp pack hydration.ts preact.ts vue.ts vanilla.ts solid.ts svelte.ts --dts --clean --target node20",
34+
"dev": "vp pack hydration.ts preact.ts vue.ts vanilla.ts solid.ts svelte.ts --platform browser --watch",
35+
"build": "vp pack hydration.ts preact.ts vue.ts vanilla.ts solid.ts svelte.ts --dts --clean --platform browser",
3636
"lint": "vp lint",
3737
"lint:fix": "vp lint --fix"
3838
},

0 commit comments

Comments
 (0)