-
-
Notifications
You must be signed in to change notification settings - Fork 602
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
使用unplugin-vue-components/rspack导致图片不生效 #4198
Comments
目前unplugin的rspack版本并没支持所有功能,因此这个可能导致插件的功能存在问题 |
嗯,unplugin插件也提了对应的issue:unplugin/unplugin-vue-components#697 |
unjs/unplugin#328 maybe related to this |
@galaxy-s10 a possible workaround if you want to try https://juejin.cn/post/7273024616522842149#heading-7 |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
This issue has been fixed by unplugin, I can not reproduce it in the demo now. |
System Info
rspack serve
Details
const ComponentsPlugin = require('unplugin-vue-components/rspack');
/**
*/
module.exports = {
context: __dirname,
entry: {
main: './src/main.tsx',
},
builtins: {
html: [
{
template: './index.html',
},
],
},
module: {
rules: [
{
test: /.svg$/,
type: 'asset',
},
{
test: /.jpg$/,
type: 'asset',
},
],
},
// 已经是最小案例了,用了ComponentsPlugin后,import aaaJpg from './aaa.jpg' 就不生效
// 注释ComponentsPlugin之后,就正常了
plugins: [ComponentsPlugin({})],
};
Reproduce link
https://github.com/galaxy-s10/issue-demo/tree/master/demo3
Reproduce Steps
直接运行npm run dev即可,已经是最小案例了,用了ComponentsPlugin后,import aaaJpg from './aaa.jpg' 就不生效,注释ComponentsPlugin之后,重新npm run dev就正常了
The text was updated successfully, but these errors were encountered: