Skip to content

fix(importAnalysis): skip encode in ssr#16213

Merged
patak-cat merged 1 commit intomainfrom
ssr-no-encode
Mar 20, 2024
Merged

fix(importAnalysis): skip encode in ssr#16213
patak-cat merged 1 commit intomainfrom
ssr-no-encode

Conversation

@bluwy
Copy link
Copy Markdown
Member

@bluwy bluwy commented Mar 20, 2024

Description

In SSR, because import specifiers are not needed to be encoded (unlike browsers), we can skip encoding altogether in import analysis. This was the initial issue that causes Nuxt to see two kinds of encoded and non-encoded links, because ssrLoadModule receives an id that we assume to be already un-encoded.

Additional context


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, especially the Pull Request Guidelines.
  • 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).
  • Update the corresponding documentation if needed.
  • Ideally, include relevant tests that fail without this PR but pass with it.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member

@patak-cat patak-cat left a comment

Choose a reason for hiding this comment

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

Ah, good catch!

@patak-cat patak-cat enabled auto-merge (squash) March 20, 2024 12:57
@patak-cat patak-cat merged commit e4d2d60 into main Mar 20, 2024
@patak-cat patak-cat deleted the ssr-no-encode branch March 20, 2024 13:01
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.

2 participants