Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add workerd condition to worker build #12069

Merged
merged 4 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/popular-chairs-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@sveltejs/adapter-cloudflare-workers": patch
"@sveltejs/adapter-cloudflare": patch
---

add `workerd` condition to cloudflare worker file build
eltigerchino marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare-workers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function ({ config = 'wrangler.toml' } = {}) {
try {
const result = await esbuild.build({
platform: 'browser',
conditions: ['worker', 'browser'],
conditions: ['workerd', 'worker', 'browser'],
eltigerchino marked this conversation as resolved.
Show resolved Hide resolved
sourcemap: 'linked',
target: 'es2022',
entryPoints: [`${tmp}/entry.js`],
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function (options = {}) {
try {
const result = await esbuild.build({
platform: 'browser',
conditions: ['worker', 'browser'],
conditions: ['workerd', 'worker', 'browser'],
eltigerchino marked this conversation as resolved.
Show resolved Hide resolved
sourcemap: 'linked',
target: 'es2022',
entryPoints: [`${tmp}/_worker.js`],
Expand Down
Loading