Skip to content

Conversation

@9aoy
Copy link
Contributor

@9aoy 9aoy commented Dec 15, 2025

Summary

fix(plugin-vue): treat it as a client build when calling from rstest, since it always test in dom environment.

reduce isServerBuild configuration in user config file.

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings December 15, 2025 03:57
@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 3d46fb9
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/693f9cad9122d20008da45d5
😎 Deploy Preview https://deploy-preview-6779--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 66 (🟢 up 8 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR simplifies the configuration required for rstest users by automatically detecting when the plugin is called from rstest and setting isServerBuild: false by default, since rstest always runs tests in a DOM environment.

Key Changes:

  • Automatically sets isServerBuild: false in vue-loader options when callerName === 'rstest'
  • Removes the manual isServerBuild configuration from rstest template files

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/plugin-vue/src/index.ts Adds logic to detect rstest caller and automatically set isServerBuild: false
packages/create-rsbuild/template-rstest/vue-ts/rstest.config.ts Simplifies configuration by removing manual isServerBuild setting
packages/create-rsbuild/template-rstest/vue-js/rstest.config.js Simplifies configuration by removing manual isServerBuild setting

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

9aoy and others added 2 commits December 15, 2025 12:00
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@9aoy 9aoy changed the title chore(plugin-vue): treat it as a client build when calling from rstest fix(plugin-vue): treat it as a client build when calling from rstest Dec 15, 2025
@chenjiahan chenjiahan changed the title fix(plugin-vue): treat it as a client build when calling from rstest fix(plugin-vue): treat it as a client build when calling from Rstest Dec 15, 2025
@chenjiahan chenjiahan enabled auto-merge (squash) December 15, 2025 05:29
@chenjiahan chenjiahan merged commit a0245f5 into main Dec 15, 2025
12 checks passed
@chenjiahan chenjiahan deleted the rstest-isServerBuild branch December 15, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants