Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

It's not auto import component in .jsx#864

Answeredbyilyaliao
ngd-b asked this question inQ&A
Discussion options

Describe the bug

When I useElementPlusResolver to auto import element-plus component In the vue3 project. But it is not auto import in .jsx file

thevite.config.js like this:

{plugins:[AutoImport({imports:["vue"],resolvers:[ElementPlusResolver(),IconsResolver({prefix:"Icon",}),],extensions:["vue","jsx","tsx"],}),Components({resolvers:[// 自动注册图标组件IconsResolver({enabledCollections:["ep"],}),ElementPlusResolver(),],extensions:["vue","jsx","tsx"],}),]}

It's only efficient in .vue component. But it's not ok in .jsx

Reproduction

https://github.com/ngd-b/vue-vite/tree/unplugin-vue-components

System Info

mac apple m2; chrome

Used Package Manager

npm

Validations

  • Follow ourCode of Conduct
  • Read theContributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is aminimal reproducible of the bug.
You must be logged in to vote

Try configuring like this:

include:[/\.vue$/,/\.vue\?vue/,/\.vue\.[tj]sx?\?vue/,// for vue-loader with experimentalInlineMatchResource enabled/\.vue\?v=/,/\.jsx/,],

Replies: 1 comment 1 reply

Comment options

Try configuring like this:

include:[/\.vue$/,/\.vue\?vue/,/\.vue\.[tj]sx?\?vue/,// for vue-loader with experimentalInlineMatchResource enabled/\.vue\?v=/,/\.jsx/,],
You must be logged in to vote
1 reply
@ngd-b
Comment options

That's good. It would be best to set defeault value.

Answer selected byngd-b
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@ngd-b@ilyaliao
Converted from issue

This discussion was converted from issue #852 on July 18, 2025 00:33.


[8]ページ先頭

©2009-2025 Movatter.jp