Skip to content

Commit

Permalink
build: add an explicit workerd export target
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Apr 7, 2024
1 parent 02f1710 commit 3fc0f0a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"deno": "./dist/browser/index.js",
"browser": "./dist/browser/index.js",
"worker": "./dist/browser/index.js",
"workerd": "./dist/browser/index.js",
"import": "./dist/node/esm/index.js",
"require": "./dist/node/cjs/index.js"
},
Expand All @@ -90,6 +91,7 @@
"deno": "./dist/browser/util/errors.js",
"browser": "./dist/browser/util/errors.js",
"worker": "./dist/browser/util/errors.js",
"workerd": "./dist/browser/util/errors.js",
"import": "./dist/node/esm/util/errors.js",
"require": "./dist/node/cjs/util/errors.js"
},
Expand All @@ -99,6 +101,7 @@
"deno": "./dist/browser/util/base64url.js",
"browser": "./dist/browser/util/base64url.js",
"worker": "./dist/browser/util/base64url.js",
"workerd": "./dist/browser/util/base64url.js",
"import": "./dist/node/esm/util/base64url.js",
"require": "./dist/node/cjs/util/base64url.js"
},
Expand Down
2 changes: 1 addition & 1 deletion tools/publish-node-cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pkg.description = undefined
pkg.browser = undefined
pkg.deno = undefined
for (const exportPath of Object.keys(pkg.exports)) {
for (const runtime of ['browser', 'deno', 'import', 'bun', 'worker']) {
for (const runtime of ['browser', 'deno', 'import', 'bun', 'worker', 'workerd']) {
pkg.exports[exportPath][runtime] = undefined
}
}
Expand Down
2 changes: 1 addition & 1 deletion tools/publish-node-esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pkg.description = undefined
pkg.browser = undefined
pkg.deno = undefined
for (const exportPath of Object.keys(pkg.exports)) {
for (const runtime of ['browser', 'deno', 'require', 'bun', 'worker']) {
for (const runtime of ['browser', 'deno', 'require', 'bun', 'worker', 'workerd']) {
pkg.exports[exportPath][runtime] = undefined
}
}
Expand Down

0 comments on commit 3fc0f0a

Please sign in to comment.