提交 82f0936c 编写于 作者: Q qiang

fix: 修复路径转为 base64 后处理错误的问题 question/96767

上级 1429909d
......@@ -78,7 +78,7 @@ function rewrite (attr, name, options) {
attr.value.startsWith('require("')
) { // require
// h5 且 publicPath 为 ./ (仅生产模式可能为./)
attr.value = `(${attr.value}).substr(1)`
attr.value = `(${attr.value}).replace(/^\\./,'')`
}
}
return true
......@@ -112,4 +112,4 @@ module.exports = {
})
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册