We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5f6369 commit 577e88fCopy full SHA for 577e88f
lib/mp-compiler/util.js
@@ -31,7 +31,8 @@ function getCompNameAndSrc (context, file) {
31
function getNameByFile (dir) {
32
// const arr = dir.match(/[pages?/components?]\/(.*?)(\/)/)
33
const arr = dir.match(/pages\/(.*?)\//)
34
- if (arr && arr[1]) {
+ // 兼容 win 下的路径格式不统一的问题
35
+ if (path.resolve(arr) && path.resolve(arr[1])) {
36
return arr[1]
37
}
38
return path.parse(dir).name
0 commit comments