-
Notifications
You must be signed in to change notification settings - Fork 375
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
feat(plugin-vue): support Vue 3 JSX compilation #4013
Conversation
🦋 Changeset detectedLatest commit: ba900c0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 216 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4013 +/- ##
==========================================
- Coverage 57.59% 57.30% -0.30%
==========================================
Files 672 645 -27
Lines 17794 17527 -267
Branches 3876 3841 -35
==========================================
- Hits 10249 10044 -205
+ Misses 6934 6859 -75
- Partials 611 624 +13 ☔ View full report in Codecov by Sentry. |
Summary
🤖 Generated by Copilot at b5e4d6d
This pull request adds support for Vue 3 JSX compilation using the
@vue/babel-plugin-jsx
package to the@modern-js/builder-plugin-vue
package. It updates the plugin function, the interface, the tests, the changeset, and the documentation files to reflect the new feature. It also adds a new end-to-end test case with a basic Vue JSX component.Details
🤖 Generated by Copilot at b5e4d6d
@modern-js/builder-plugin-vue
package (link, link, link, link, link, link, link, link)vueJsxOptions
property toPluginVueOptions
interface to pass options to@vue/babel-plugin-jsx
package (link)mergeBuilderConfig
helper function (link)* Set
disableSvgr
property totrue
inoutput
object to avoid SVG React component transformation (link)* Add
@vue/babel-plugin-jsx
plugin withoptions.vueJsxOptions
tobabel
tool intools
object to enable Vue 3 JSX compilation (link)options.vueLoaderOptions
property when merging withvueLoaderOptions
object (link)vueJsxOptions
property in English and Chinese files (link, link)builderPluginVue
function (link, link, link)* Add
A.jsx
file with Vue JSX component definition (link)* Add
index.js
file with entry point for Vue app instance (link)* Use
build
,getHrefByEntryName
, andpage
helper functions to create builder instance, get URL, and interact with browser (link)* Expect button element with id of
button1
to have correct innerHTML value (link)* Close builder instance after test (link)
@vue/babel-plugin-jsx
plugin application and configuration (link, link)builderPluginBabel
function from@modern-js/builder-webpack-provider/plugins/babel
package (link)@vue/babel-plugin-jsx
plugin is applied correctly with default options (link)@vue/babel-plugin-jsx
plugin options can be configured throughvueJsxOptions
property (link)createStubBuilder
,unwrapWebpackConfig
, andtoMatchSnapshot
helper functions to create mock builder instance, get webpack config, and compare with snapshot (link)Related Issue
Checklist
pnpm run change
.