-
Notifications
You must be signed in to change notification settings - Fork 762
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
chore(unenv-preset): Add .cjs output for the preset #7721
Conversation
<style>
pre {
color: red;
}
</style>
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12707700387/npm-package-wrangler-7721 |
🦋 Changeset detectedLatest commit: 160e9d9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
What do you mean "wrangler requires the preset"? workers-sdk/packages/wrangler/src/deployment-bundle/esbuild-plugins/hybrid-nodejs-compat.ts Line 4 in 9d2740a
and also in the PR https://github.com/cloudflare/workers-sdk/pull/7720/files#diff-d5f05e17ffb161174d2bfea37bf23d39679290784e9aff28ac77bc06e3492459R3 |
Or do you mean that if a library "requires" a Node.js module then our aliasing would result in the polyfilled module being required? |
Wrangler is compiled to cjs (and unenv is external)
|
OMG that seems unnecesssary. Perhaps we could just change that? |
The PR could still be useful if we change that - and I don't want to go down this rabbit hole today |
Thanks @petebacondarwin |
We do not need .cjs for the runtime files but
wrangler
requires the preset so we need to have adist/index.cjs
@cloudflare/unenv-preset
#7720