Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug]: The resolvers of unplugin-auto-import and unplugin-vue-components do not work at the same time #4709

Closed
304541805 opened this issue Mar 4, 2025 · 6 comments

Comments

@304541805
Copy link

Version

"@rsbuild/core": "^1.2.14",
    "@rsbuild/plugin-vue": "^1.0.6",
    "typescript": "^5.8.2",
    "unplugin-auto-import": "^19.1.1",
    "unplugin-vue-components": "^28.4.1"

Details

Image

Image
原来好好的,resolvers加载三方的地方突然不好使了,然后我三个项目同时不好使,我试了下我的vite项目是好使的只有rebuild失效了,使用pnpm和npm都试了也都清缓存了,是rebuild有什么缓存的地方吗,我用官网脚手架新建一个项目也是如此一样不生效

Reproduce link

https://gitee.com/shenyang_chess_and_card_games/rsbuild-project.git

Reproduce Steps

链接是我新建的测试项目不生效

@304541805
Copy link
Author

304541805 commented Mar 5, 2025 via email

@chenjiahan chenjiahan changed the title [Bug]: unplugin-auto-import和unplugin-vue-components的resolvers同时不好使了 [Bug]: The resolvers of unplugin-auto-import and unplugin-vue-components do not work at the same time Mar 5, 2025
@304541805
Copy link
Author

If it's a bug, I'll first roll back to version 1.2.8 and wait for it to be resolved. Currently, using version 1.2.8 is functional

@chenjiahan
Copy link
Member

You can add /\.vue\.[tj]sx?\?vue/ to include to fix this issue. See unplugin/unplugin-vue-components#829 for background.

-      include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
+     include: [/\.vue$/, /\.vue\?vue/, /\.md$/, /\.vue\.[tj]sx?\?vue/],

@304541805
Copy link
Author

You can add /\.vue\.[tj]sx?\?vue/ to include to fix this issue. See unplugin/unplugin-vue-components#829 for background.

  •  include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
    
  • include: [/\.vue$/, /\.vue\?vue/, /\.md$/, /\.vue\.[tj]sx?\?vue/],
    

thank you Has been solved

@304541805
Copy link
Author

You can add /\.vue\.[tj]sx?\?vue/ to include to fix this issue. See unplugin/unplugin-vue-components#829 for background.

  •  include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
    
  • include: [/\.vue$/, /\.vue\?vue/, /\.md$/, /\.vue\.[tj]sx?\?vue/],
    

thank you Has been solved

delete include also good

@304541805
Copy link
Author

thank you It is my original custom configuration limit.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants