Skip to content

feat(plugin-vue): add test option#6729

Merged
chenjiahan merged 2 commits intomainfrom
plugin_vue_test_1208
Dec 9, 2025
Merged

feat(plugin-vue): add test option#6729
chenjiahan merged 2 commits intomainfrom
plugin_vue_test_1208

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

Allow customizing the file matching rules for Vue Single File Components through the test option. This enables handling additional file types like .md files when they are transformed into Vue components.

Checklist

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

Copilot AI review requested due to automatic review settings December 8, 2025 14:27
@netlify
Copy link
Copy Markdown

netlify bot commented Dec 8, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit b6a51c3
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/6936e04b1c112b000840d4aa
😎 Deploy Preview https://deploy-preview-6729--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: 71 (🔴 down 2 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.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Copy link
Copy Markdown
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 adds a configurable test option to the Vue plugin, enabling users to customize which file types should be treated as Vue Single File Components. This is particularly useful when using other loaders to transform files (like .md files) into Vue components.

  • Added a test option to PluginVueOptions that accepts Rspack.RuleSetCondition
  • Updated the webpack chain configuration to use the custom test condition instead of hardcoded .vue pattern
  • Added comprehensive test coverage and documentation in both English and Chinese

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/plugin-vue/src/index.ts Added test option type definition and implementation to allow custom file matching patterns
packages/plugin-vue/tests/index.test.ts Added test case to verify custom test condition works with .md files
packages/plugin-vue/tests/snapshots/index.test.ts.snap Added snapshot for the custom test condition test case
website/docs/en/plugins/list/plugin-vue.mdx Added English documentation for the new test option with usage example
website/docs/zh/plugins/list/plugin-vue.mdx Added Chinese documentation for the new test option with usage example

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

@chenjiahan chenjiahan merged commit 4926491 into main Dec 9, 2025
11 checks passed
@chenjiahan chenjiahan deleted the plugin_vue_test_1208 branch December 9, 2025 02:07
This was referenced Dec 9, 2025
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.

2 participants