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(plugin-react): return code if should skip in transform (fix #7586) #8676

Merged
merged 3 commits into from Jun 24, 2022

Conversation

ZYSzys
Copy link
Contributor

@ZYSzys ZYSzys commented Jun 20, 2022

Description

In transform phase, just return code so that the import React from 'react'; could be injected if shouldSkip is true.

Fixes #7586

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

@ZYSzys ZYSzys changed the title fix(plugin-react): return code if should skip in transform fix(plugin-react): return code if should skip in transform (fix #7586) Jun 24, 2022
@netlify
Copy link

netlify bot commented Jun 24, 2022

Deploy Preview for vite-docs-main ready!

Name Link
🔨 Latest commit c80018a
🔍 Latest deploy log https://app.netlify.com/sites/vite-docs-main/deploys/62b54e4054ade900098d8260
😎 Deploy Preview https://deploy-preview-8676--vite-docs-main.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 site settings.

@bluwy
Copy link
Member

bluwy commented Jun 24, 2022

The source code change looks good to me, but it seems like something's up in CI.

@ZYSzys
Copy link
Contributor Author

ZYSzys commented Jun 24, 2022

The source code change looks good to me, but it seems like something's up in CI.

@bluwy Maybe it's because of the wrong pnpm version, I've changed to pnpm@v7 and CI is successful now.

bluwy
bluwy approved these changes Jun 24, 2022
@patak-dev patak-dev merged commit 206e22a into vitejs:main Jun 24, 2022
12 checks passed
@ZYSzys ZYSzys deleted the fix-react-build branch June 24, 2022 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants