From 19047fc09b13f2df8f8293c9b389be248d40b39a Mon Sep 17 00:00:00 2001 From: bluwy Date: Thu, 19 Dec 2024 21:17:30 +0100 Subject: [PATCH] feat: add "worker" exports condition --- .changeset/calm-shrimps-remain.md | 5 +++++ packages/svelte/package.json | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .changeset/calm-shrimps-remain.md diff --git a/.changeset/calm-shrimps-remain.md b/.changeset/calm-shrimps-remain.md new file mode 100644 index 000000000000..280ebb3444db --- /dev/null +++ b/.changeset/calm-shrimps-remain.md @@ -0,0 +1,5 @@ +--- +'svelte': minor +--- + +feat: add "worker" exports condition to better support bundling for worker-based environments diff --git a/packages/svelte/package.json b/packages/svelte/package.json index b69cd565cc68..a58a2d73bd12 100644 --- a/packages/svelte/package.json +++ b/packages/svelte/package.json @@ -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" }, @@ -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" }, @@ -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" }, @@ -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" },