Skip to content

Commit

Permalink
feat: add "worker" exports condition (#14779)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Dec 19, 2024
1 parent 2086c19 commit 72b7bc7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/calm-shrimps-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': minor
---

feat: add "worker" exports condition to better support bundling for worker-based environments
4 changes: 4 additions & 0 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"exports": {
".": {
"types": "./types/index.d.ts",
"worker": "./src/index-server.js",
"browser": "./src/index-client.js",
"default": "./src/index-server.js"
},
Expand Down Expand Up @@ -64,6 +65,7 @@
},
"./legacy": {
"types": "./types/index.d.ts",
"worker": "./src/legacy/legacy-server.js",
"browser": "./src/legacy/legacy-client.js",
"default": "./src/legacy/legacy-server.js"
},
Expand All @@ -73,6 +75,7 @@
},
"./reactivity": {
"types": "./types/index.d.ts",
"worker": "./src/reactivity/index-server.js",
"browser": "./src/reactivity/index-client.js",
"default": "./src/reactivity/index-server.js"
},
Expand All @@ -86,6 +89,7 @@
},
"./store": {
"types": "./types/index.d.ts",
"worker": "./src/store/index-server.js",
"browser": "./src/store/index-client.js",
"default": "./src/store/index-server.js"
},
Expand Down

0 comments on commit 72b7bc7

Please sign in to comment.