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
问题类型 如何实现某功能 报 BUG 某功能改进建议 新功能建议 文档问题 其他/以上都不是 问题详情 在dev开发环境中background-image会转成base64,但是prod时,没有转换,导致文件不能访问 期望效果 background-image:url('base64:')同时把源文件删除 实际情况 还是相对路径url("../") 问题示例 和 复现步骤 background-image: url("../common/back.png"); 问题环境 okam-core 版本:0.3.3 okam-build 版本:0.3.2 运行环境 微信小程序开发工具
在dev开发环境中background-image会转成base64,但是prod时,没有转换,导致文件不能访问
background-image:url('base64:')同时把源文件删除
还是相对路径url("../")
background-image: url("../common/back.png");
okam-core 版本:0.3.3 okam-build 版本:0.3.2
运行环境
微信小程序开发工具
The text was updated successfully, but these errors were encountered:
@githublyp prod 阶段没有转换,确认下你配置的构建规则有加上base64的处理规则吗,你如果只是 dev 属性下加,肯定不会转换,如果都需要转换,可以参考下述配置:
{ dev: { // dev 阶段规则 processors: { postcss: { options: { plugins: [ ['postcss-url', { url: 'inline' }] ] } } } }, prod: { // prod 阶段规则 processors: { postcss: { options: { plugins: [ ['postcss-url', { url: 'inline' }] ] } } } } }
Sorry, something went wrong.
@githublyp 第二个问题,可以具体点吗?给个代码示例更具体阐述下问题包括现象?
OK
No branches or pull requests
The text was updated successfully, but these errors were encountered: