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"? 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
wranglerrequires the preset so we need to have adist/index.cjs@cloudflare/unenv-preset#7720