Skip to content

Use esmExternalRequirePlugin to convert external require calls in Vite 8#12187

Merged
jamesopstad merged 6 commits intomainfrom
james/vite-8-external-require
Jan 27, 2026
Merged

Use esmExternalRequirePlugin to convert external require calls in Vite 8#12187
jamesopstad merged 6 commits intomainfrom
james/vite-8-external-require

Conversation

@jamesopstad
Copy link
Copy Markdown
Contributor

@jamesopstad jamesopstad commented Jan 27, 2026

Fixes #11948

Use esmExternalRequirePlugin to convert external require calls in Vite 8.

This also reenables the Vite 8 tests as another beta has been released that resolves the additional failures.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: covered by existing tests
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: compatibility fix

A picture of a cute animal (not mandatory, but encouraged)


Open with Devin

@jamesopstad jamesopstad requested a review from a team as a code owner January 27, 2026 14:18
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: 16815ef

The changes in this PR will be included in the next version bump.

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

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 5 additional flags.

Open in Devin Review

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Jan 27, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@12187

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@12187

miniflare

npm i https://pkg.pr.new/miniflare@12187

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@12187

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@12187

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@12187

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@12187

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@12187

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@12187

wrangler

npm i https://pkg.pr.new/wrangler@12187

commit: 16815ef

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jan 27, 2026
@jamesopstad jamesopstad merged commit 0c85b05 into main Jan 27, 2026
38 of 39 checks passed
@jamesopstad jamesopstad deleted the james/vite-8-external-require branch January 27, 2026 14:49
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

nodejs_compat + vite-plugin + require(node package) does not work with Vite 8

3 participants