-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
图片路径有问题 #16593
Comments
TheKonka
added
V-3
Version - 3.x
F-react
Framework - React
T-weapp
Target - 编译到微信小程序
labels
Sep 23, 2024
This was referenced Sep 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
相关平台
微信小程序
复现仓库
https:/Lliuxs/taro-app.git
小程序基础库: 3.5.8
使用框架: React
复现步骤
期望结果
期望可以正确的加载图片
实际结果
图片的路径不正确
[渲染层网络层错误] Failed to load local image resource /components/common/img/1.png
the server responded with a status of 500 (HTTP/1.1 500 Internal Server Error)
(env: macOS,mp,1.06.2409182; lib: 2.14.4)
打包生成的代码为:
var _1_namespaceObject = webpack_require.p + "components/common/img/1.png";
webpack_require.p = "/";
引入的代码的路径为 /components/common/img/1.png 期望的代码是 taro/components/common/img/1.png
设置 output: publicPath ?
环境信息
The text was updated successfully, but these errors were encountered: