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: avoid crawl end logic for ssr build #13976

Closed
wants to merge 1 commit into from

Conversation

patak-dev
Copy link
Member

Description

We shouldn't be doing extra resolves when we are in build SSR. I found a Unexpected early exit. This happens when Promises returned by plugins cannot resolve. when testing https://stackblitz.com/edit/github-vke2fz-bbe4ra?file=vite.config.ts&terminal=build locally and adding a local override to Vite. I don't know how to add a test for this one though.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

@stackblitz
Copy link

stackblitz bot commented Jul 28, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@@ -96,7 +96,7 @@ export function optimizedDepsBuildPlugin(config: ResolvedConfig): Plugin {

if (depsOptimizer.isOptimizedDepFile(id)) {
return id
} else {
} else if (!options.ssr) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why we do it specifically for SSR? I ran the repro and the build seems to get stuck for me. I wonder if this could also be fixed by #13127? (I forgot about that PR but I think we could also merge that too)

Copy link
Member Author

Choose a reason for hiding this comment

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

My wires crossed with SSR dev here, where we only optimize what is explicitly defined. Closing this PR. I need to finish the delayLoading feat for rollup. Closing this PR.

@patak-dev patak-dev closed this Jul 29, 2023
@patak-dev patak-dev deleted the fix/avoid-crawl-end-logic-for-ssr-build branch March 22, 2024 16:04
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.

None yet

2 participants