Skip to content

Commit fa81015

Browse files
committed
Don't force xstate to be bundled
1 parent 595e269 commit fa81015

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gapless.js",
3-
"version": "4.0.3",
3+
"version": "4.0.4",
44
"description": "Gapless audio playback javascript plugin",
55
"type": "module",
66
"main": "dist/index.mjs",
@@ -47,6 +47,14 @@
4747
"vitest": "^4.0.18"
4848
},
4949
"packageManager": "pnpm@10.30.2",
50+
"peerDependencies": {
51+
"xstate": "^5.28.0"
52+
},
53+
"peerDependenciesMeta": {
54+
"xstate": {
55+
"optional": true
56+
}
57+
},
5058
"dependencies": {
5159
"xstate": "^5.28.0"
5260
}

tsup.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export default defineConfig({
99
clean: true,
1010
minify: true,
1111
dts: true,
12-
// Bundle xstate so consumers don't need to install it separately
13-
noExternal: ['xstate'],
12+
// Mark xstate as external so consumers can share a single instance
13+
external: ['xstate'],
1414
});

0 commit comments

Comments
 (0)