Skip to content
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: set resolve.mainFields and resolve.conditions for SSR environment #6896

Conversation

sapphi-red
Copy link
Contributor

Description

Since vitejs/vite#18395, ssr.resolve.conditions/ssr.resolve.mainField(this does not exist yet, maybe needed?) does not inherit resolve.conditions/resolve.mainFields anymore.
This PR sets those values by environments.ssr.resolve.conditions/environments.ssr.resolve.mainFields.

This PR should fix the ecosystem-ci fail for vite-plugin-react.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Copy link

netlify bot commented Nov 12, 2024

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 5ca9e04
🔍 Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/67330a89f15992000847d209
😎 Deploy Preview https://deploy-preview-6896--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

pkg-pr-new bot commented Nov 13, 2024

@vitest/browser

pnpm add https://pkg.pr.new/@vitest/browser@6896

@vitest/coverage-istanbul

pnpm add https://pkg.pr.new/@vitest/coverage-istanbul@6896

@vitest/expect

pnpm add https://pkg.pr.new/@vitest/expect@6896

@vitest/coverage-v8

pnpm add https://pkg.pr.new/@vitest/coverage-v8@6896

@vitest/mocker

pnpm add https://pkg.pr.new/@vitest/mocker@6896

@vitest/pretty-format

pnpm add https://pkg.pr.new/@vitest/pretty-format@6896

@vitest/runner

pnpm add https://pkg.pr.new/@vitest/runner@6896

@vitest/snapshot

pnpm add https://pkg.pr.new/@vitest/snapshot@6896

@vitest/spy

pnpm add https://pkg.pr.new/@vitest/spy@6896

@vitest/ui

pnpm add https://pkg.pr.new/@vitest/ui@6896

@vitest/utils

pnpm add https://pkg.pr.new/@vitest/utils@6896

vite-node

pnpm add https://pkg.pr.new/vite-node@6896

vitest

pnpm add https://pkg.pr.new/vitest@6896

@vitest/web-worker

pnpm add https://pkg.pr.new/@vitest/web-worker@6896

@vitest/ws-client

pnpm add https://pkg.pr.new/@vitest/ws-client@6896

commit: 45c904b

hi-ogawa added a commit to hi-ogawa/vitest that referenced this pull request Nov 13, 2024
packages/vitest/src/node/plugins/index.ts Outdated Show resolved Hide resolved
packages/vitest/src/node/plugins/workspace.ts Outdated Show resolved Hide resolved
packages/vitest/src/node/plugins/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

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

Thanks!
I'm testing Vite 6 in #6867 and had a issue with immutable package, but fixed after adding this. It looks like it was due to Vitest picking up module field.

@sheremet-va sheremet-va merged commit 251893b into vitest-dev:main Nov 13, 2024
17 of 18 checks passed
@sapphi-red sapphi-red deleted the chore/set-resolve-conditions-for-ssr-environment branch November 13, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants