Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: reuse script ast for rewriting default #136

Merged
merged 1 commit into from
Mar 28, 2023
Merged

refactor: reuse script ast for rewriting default #136

merged 1 commit into from
Mar 28, 2023

Conversation

sxzz
Copy link
Member

@sxzz sxzz commented Mar 28, 2023

Description

Reuse the AST and MagicString instance from resolveScript.

Please don't merge it until the upstream PR got merged and released.

Additional context

vitejs/vite#10888
vuejs/core#7068 (review)


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 Commit 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.

@yyx990803
Copy link
Member

Should be safe to merge now, since it feature detects.

@yyx990803 yyx990803 merged commit 9d84656 into vitejs:main Mar 28, 2023
@sxzz sxzz deleted the feat/reuse-ast branch March 28, 2023 04:03
@sxzz sxzz mentioned this pull request Mar 29, 2023
9 tasks
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants