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

fix(ssr): ignore module exports condition #11409

Merged
merged 1 commit into from Dec 20, 2022
Merged

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Dec 18, 2022

Description

fix #11385

Ignore the "module" exports condition during SSR. The condition should be used by bundlers only.

This may technically be a breaking change, but I don't think it should have worked in the first place, and isn't something we explicitly support.

Additional context

Bug introduced in #11101

I also noticed that SSR also supports the production and development condition since Vite 2 (?), but I don't think we can change this for now.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bluwy bluwy added p4-important Violate documented behavior or significantly improves performance (priority) feat: ssr labels Dec 18, 2022
@patak-dev
Copy link
Member

/ecosystem-ci run

@vite-ecosystem-ci
Copy link

vite-ecosystem-ci bot commented Dec 18, 2022

📝 Ran ecosystem CI: Open

suite result
astro ✅ success
histoire ❌ failure
iles ✅ success
ladle ❌ failure
laravel ✅ success
marko ✅ success
nuxt-framework ✅ success
previewjs ✅ success
rakkas ✅ success
sveltekit ✅ success
vite-plugin-ssr ✅ success
vite-plugin-react ✅ success
vite-plugin-react-swc ✅ success
vite-plugin-svelte ✅ success
vite-plugin-vue ✅ success
vite-setup-catalogue ✅ success
vitepress ✅ success
vitest ✅ success
windicss ✅ success

@bluwy
Copy link
Member Author

bluwy commented Dec 20, 2022

Looks like histoire and ladle previously failed on main too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: ssr p4-important Violate documented behavior or significantly improves performance (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Curious behaviour when loading CJS/ESM with vite.ssrLoadModule
2 participants