Skip to content

Allow optimizeDeps.exclude to be specified for Worker environments #9753

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

Merged
merged 6 commits into from
Jun 27, 2025

Conversation

jamesopstad
Copy link
Contributor

Fixes #9538.

Allow optimizeDeps.exclude to be specified for Worker environments. This enables other plugins to exclude dependencies from optimization that require access to virtual modules. Note that excluded dependencies must be ESM.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: N/A
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because: not a Wrangler change

@jamesopstad jamesopstad requested a review from a team as a code owner June 26, 2025 09:27
@jamesopstad jamesopstad added e2e Run wrangler + vite-plugin e2e tests on a PR vite-plugin Relating to the `@cloudflare/vite-plugin` package labels Jun 26, 2025
Copy link

changeset-bot bot commented Jun 26, 2025

🦋 Changeset detected

Latest commit: 3524a06

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

This PR includes changesets to release 1 package
Name Type
@cloudflare/vite-plugin Minor

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

pkg-pr-new bot commented Jun 26, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 3524a06

@dario-piotrowicz dario-piotrowicz added the skip-v3-pr Skip validation of presence of a v3 backport PR label Jun 26, 2025
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jun 26, 2025
@jamesopstad jamesopstad added this pull request to the merge queue Jun 26, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 26, 2025
@jamesopstad jamesopstad enabled auto-merge June 27, 2025 11:30
@jamesopstad jamesopstad added this pull request to the merge queue Jun 27, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 27, 2025
@jamesopstad jamesopstad added this pull request to the merge queue Jun 27, 2025
Merged via the queue into main with commit 67130b3 Jun 27, 2025
28 checks passed
@jamesopstad jamesopstad deleted the james/allow-optimize-deps-exclude branch June 27, 2025 11:47
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run wrangler + vite-plugin e2e tests on a PR skip-v3-pr Skip validation of presence of a v3 backport PR vite-plugin Relating to the `@cloudflare/vite-plugin` package
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

@cloudflare/vite-plugin doesn't allow optimizeDeps.exclude for framework packages to avoid being optimized
2 participants