We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
静态资源使用相对路径,但使用npm run build:mp-weixin -- --subpackage=sub1打包后图片资源路径就变成了绝对路径。
npm run build:mp-weixin -- --subpackage=sub1
在更改vite.config.ts中的base改成'./'后依然打包成了绝对路径
vite.config.ts
'./'
使用alias引用图片,也依然打包成绝对路径
package.json相关环境如下
"dependencies": { "@dcloudio/uni-app": "3.0.0-4000820240401001", "@dcloudio/uni-app-plus": "3.0.0-4000820240401001", "@dcloudio/uni-components": "3.0.0-4000820240401001", "@dcloudio/uni-h5": "3.0.0-4000820240401001", "@dcloudio/uni-mp-alipay": "3.0.0-4000820240401001", "@dcloudio/uni-mp-baidu": "3.0.0-4000820240401001", "@dcloudio/uni-mp-jd": "3.0.0-4000820240401001", "@dcloudio/uni-mp-kuaishou": "3.0.0-4000820240401001", "@dcloudio/uni-mp-lark": "3.0.0-4000820240401001", "@dcloudio/uni-mp-qq": "3.0.0-4000820240401001", "@dcloudio/uni-mp-toutiao": "3.0.0-4000820240401001", "@dcloudio/uni-mp-weixin": "3.0.0-4000820240401001", "@dcloudio/uni-mp-xhs": "3.0.0-4000820240401001", "@dcloudio/uni-quickapp-webview": "3.0.0-4000820240401001", "vue": "^3.3.11", "vue-i18n": "^9.1.9" }, "devDependencies": { "@dcloudio/types": "^3.3.2", "@dcloudio/uni-automator": "3.0.0-4000820240401001", "@dcloudio/uni-cli-shared": "3.0.0-4000820240401001", "@dcloudio/uni-stacktracey": "3.0.0-4000820240401001", "@dcloudio/vite-plugin-uni": "3.0.0-4000820240401001", "@types/node": "^20.12.7", "@vue/runtime-core": "^3.3.11", "@vue/tsconfig": "^0.1.3", "typescript": "^4.9.4", "vite": "4.3.5", "vue-tsc": "^1.0.24" }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
静态资源使用相对路径,但使用
npm run build:mp-weixin -- --subpackage=sub1
打包后图片资源路径就变成了绝对路径。在更改
vite.config.ts
中的base改成'./'
后依然打包成了绝对路径使用alias引用图片,也依然打包成绝对路径
package.json相关环境如下
The text was updated successfully, but these errors were encountered: