关于vant4在vant文件夹下新增assets静态资源文件夹后打包到lib的index.css资源引用问题 #12664
yueyunkeji
started this conversation in
General
Replies: 3 comments
-
|
给个测试仓库看看吧 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
内网无法提供呢
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2024年3月6日(星期三) 晚上6:47
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [youzan/vant] [Bug Report] 关于vant4在vant文件夹下新增assets静态资源文件夹后打包到lib的index.css资源引用问题 (Issue #12655)
给个测试仓库看看吧
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
这个不属于 Vant 组件使用的 bug / feature,因此会被移动到讨论区 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction Link
无
Vant Version
4.8.2
Describe the Bug
1、在vant文件夹下新增assets文件;
2、里面有font等资源目录;
3、组件及vant下的style文件夹的样式文件有引用assets静态资源文件
4、pnpm run build 这个时候lib下面会多出index.css全局样式,这个样式里面的资源引用地址是错误的.
5、我尝试在vitest.config.ts里面使用import alias from '@rollup/plugin-alias'
import path from 'path'
alias({
entries: [{ find: '@', replacement: path.resolve(__dirname, 'src') }],
}),
并修改less里面的资源引用前缀, pnpm run build 这个时候打包后lib里面都变成了@/assets, 但是pnpm run dev这些资源又无法找到了, 请问我应该如何修改?
Reproduce Steps
给出解决方案或者示例代码
Device / Browser
No response
Beta Was this translation helpful? Give feedback.
All reactions