Skip to content

Commit

Permalink
don't bother prefixing the id
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jan 18, 2024
1 parent eb1d5f1 commit 5571c06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions packages/adapter-cloudflare-workers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,9 @@ export default function ({ config = 'wrangler.toml' } = {}) {
/The package "(.+)" wasn't found on the file system but is built into node/.exec(
node.text
);
if (match) {
let id = match[1];
if (!id.startsWith('node:')) id = `node:${id}`;

node.text = `Cannot use "${id}" when deploying to Cloudflare.`;
if (match) {
node.text = `Cannot use "${match[1]}" when deploying to Cloudflare.`;
}
}
}
Expand Down
6 changes: 2 additions & 4 deletions packages/adapter-cloudflare/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,9 @@ export default function (options = {}) {
/The package "(.+)" wasn't found on the file system but is built into node/.exec(
node.text
);
if (match) {
let id = match[1];
if (!id.startsWith('node:')) id = `node:${id}`;

node.text = `Cannot use "${id}" when deploying to Cloudflare.`;
if (match) {
node.text = `Cannot use "${match[1]}" when deploying to Cloudflare.`;
}
}
}
Expand Down

0 comments on commit 5571c06

Please sign in to comment.