提交 4152e38b 编写于 作者: Q qiang

fix: 修复部分情况 css 编译报错的问题

上级 87191113
......@@ -128,7 +128,8 @@ module.exports = function generateComponent (compilation) {
}
if (name.endsWith('.wxss')) {
// 移除部分含有错误引用的 wxss 文件
const origSource = assets[name].source().trim()
let origSource = assets[name].source()
origSource = origSource.trim ? origSource.trim() : ''
const result = origSource.match(/^@import ["'](.+?)["']$/)
if (result) {
const wxssPath = path.join(path.dirname(name), result[1])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册