Skip to content

fix: wxt prepare fails with the error "__vite_ssr_exportName__ is not defined" when using Vite 7 - #1884

Merged
aklinker1 merged 5 commits into
wxt-dev:mainfrom
aiktb:fix/__vite_ssr_exportname__not_found
Dec 16, 2025
Merged

aklinker1 merged 5 commits into
wxt-dev:mainfrom
aiktb:fix/__vite_ssr_exportname__not_found

Conversation

@aiktb

@aiktb aiktb commented Sep 8, 2025 •

Copy link
Copy Markdown
Contributor

Overview

See https://discord.com/channels/1212416027611365476/1411816139700437072

The minimum vite-node version required for vite 7 is 3.2.0. Lower versions may have compatibility issues.

Related: vitest-dev/vitest#7925 and vitejs/vite#19996

Can vite-node 2 be removed from scope?

Copilot AI review requested due to automatic review settings September 8, 2025 01:01

Copilot AI 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.

Pull Request Overview

This PR fixes an issue where wxt prepare fails with the error "vite_ssr_exportName is not defined" when using Vite 7 by updating the vite-node dependency version.

  • Updates vite-node dependency to support version ^3.2.4 instead of ^3.1.2
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@netlify

netlify Bot commented Sep 8, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit b8a0b1a
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/69418ffe8ce75e00085139dd
😎 Deploy Preview https://deploy-preview-1884--creative-fairy-df92c4.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 project configuration.

@aklinker1 aklinker1 left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can vite-node 2 be removed from scope?

Not for now, no. Since WXT supports vite 5-7, we need vite-node 2 for vite 5

Yes, we can. Seems like vite-node 3.2.5 supports vite ≥ 5!

https://www.npmjs.com/package/vite-node/v/3.2.4?activeTab=code

@pkg-pr-new

pkg-pr-new Bot commented Sep 9, 2025 •

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@1884

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@1884

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@1884

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@1884

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@1884

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@1884

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@1884

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@1884

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@1884

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@1884

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@1884

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@1884

wxt

npm i https://pkg.pr.new/wxt@1884

commit: b8a0b1a

@codecov

codecov Bot commented Sep 9, 2025 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.19%. Comparing base (223cf86) to head (b8a0b1a).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1884      +/-   ##
==========================================
- Coverage   81.33%   81.19%   -0.14%     
==========================================
  Files         131      131              
  Lines        6675     6675              
  Branches     1096     1097       +1     
==========================================
- Hits         5429     5420       -9     
- Misses       1236     1245       +9     
  Partials       10       10              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aiktb
aiktb requested a review from aklinker1 September 9, 2025 13:47
@aiktb

aiktb commented Sep 13, 2025

Copy link
Copy Markdown
Contributor Author

Can vite-node 2 be removed from scope?

Not for now, no. Since WXT supports vite 5-7, we need vite-node 2 for vite 5

Yes, we can. Seems like vite-node 3.2.5 supports vite ≥ 5!

https://www.npmjs.com/package/vite-node/v/3.2.4?activeTab=code

I manually tested vite@5 and vite-node@3 and found no issues, so I removed vite-node@2 from the dependencies.
Requires re-approval

@oeyoews

oeyoews commented Sep 27, 2025

Copy link
Copy Markdown

It works for me. Thanks!

@aklinker1

Copy link
Copy Markdown
Member

Thanks for verifying!

@aklinker1
aklinker1 merged commit 5414a0a into wxt-dev:main Dec 16, 2025
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for helping make WXT better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants