Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(nitro): restore 'import' condition for ssr resolve#35126

Merged
danielroe merged 3 commits into
mainfrom
fix/external-vue
May 20, 2026
Merged

fix(nitro): restore 'import' condition for ssr resolve#35126
danielroe merged 3 commits into
mainfrom
fix/external-vue

Conversation

@danielroe

Copy link
Copy Markdown
Member

πŸ”— Linked issue

resolves #34888
af7a127

πŸ“š Description

this reverts #34739 (cc: @yamachi4416) though we likely need to revisit this in future πŸ™

@github-actions github-actions Bot added 5.x πŸ› bug Something isn't working as expected labels May 19, 2026
Comment thread test/external-vue-resolution.test.ts Fixed
@pkg-pr-new

pkg-pr-new Bot commented May 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@35126

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@35126

nuxt

npm i https://pkg.pr.new/nuxt@35126

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@35126

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@35126

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@35126

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@35126

commit: 0c175a5

@coderabbitai

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

πŸ€– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@test/fixtures/external-vue-resolution/modules/ssr-resolve-check.ts`:
- Around line 14-20: The check currently returns early when SSR resolve
`conditions` is missing, allowing the fixture to pass; instead, change the early
return to throw a hard error so missing SSR resolve conditions fail the test:
replace the `if (!conditions) { return }` with throwing a descriptive Error that
includes `conditions` context and `importer`, so the regression guard is
enforced; update the same block where `conditions` is read and where
`resolveModulePath(id, { try: true, from: importer, conditions })` and the
subsequent throw for unresolved modules are located.
πŸͺ„ Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
βš™οΈ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f99ee8c2-0fa8-434f-8465-d86501ca2083

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 2124a89 and 2c46628.

β›” Files ignored due to path filters (2)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
  • test/fixtures/external-vue-resolution/package.json is excluded by !**/package.json
πŸ“’ Files selected for processing (7)
  • packages/nitro-server/src/index.ts
  • packages/nitro-server/src/utils.ts
  • test/external-vue-resolution.test.ts
  • test/fixtures/external-vue-resolution/app.vue
  • test/fixtures/external-vue-resolution/modules/ssr-resolve-check.ts
  • test/fixtures/external-vue-resolution/nuxt.config.ts
  • test/fixtures/external-vue-resolution/tsconfig.json

Comment thread test/fixtures/external-vue-resolution/modules/ssr-resolve-check.ts Outdated
@codspeed-hq

codspeed-hq Bot commented May 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

βœ… 20 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing fix/external-vue (0c175a5) with main (2124a89)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@danielroe danielroe merged commit 18b6611 into main May 20, 2026
31 checks passed
@danielroe danielroe deleted the fix/external-vue branch May 20, 2026 07:39
@github-actions github-actions Bot mentioned this pull request May 20, 2026
4 tasks
andreiborza added a commit to getsentry/sentry-javascript that referenced this pull request May 20, 2026
…#21036)

The explicit `pnpm add vue vue-router` step was added in #20519 as a
temporary workaround for nuxt/nuxt#34888. This has been fixed upstream
in nuxt/nuxt#35126.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x πŸ› bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nuxt 4 nightly: Vite SSR build fails to externalize vue and vue-router from Nuxt's own runtime files

1 participant