weapp-native
weapp-native copied to clipboard
在windows下,编译路径错误
https://github.com/skyFi/weapp-native/blob/b70df82c4be6ae49c6215af61b7fcc5f87a5348a/src/bin/transform.js#L477
在windows下,app.json里的pages路径类似:'pages\index\index',会导致报错。应该为'pages/index/index' 现在在上面代码位置上一行添加下面一行来解决。
ImportPages.forEach(function(pathStr, i){y.splice(i,1,pathStr.replace(/\\/g, '/'));});
类似的,还有引入modules目录下文件、components下文件。 变量ImportPages 、ImportComponents、ImportSources 等,ComponentRelations 暂时不清楚是否需要修改。
非常感谢做了这个工具,非常有用。
确实在windows下有这样的问题,楼上的解决了么?
@JunQiGenYuan 非常欢迎PR
@16522855 起初没有考虑Windows上的兼容性,是个问题。
https://github.com/skyFi/weapp-native/pull/5 PR is proposed