weapp-native icon indicating copy to clipboard operation
weapp-native copied to clipboard

在windows下,编译路径错误

Open JunQiGenYuan opened this issue 7 years ago • 3 comments

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 暂时不清楚是否需要修改。

非常感谢做了这个工具,非常有用。

JunQiGenYuan avatar Feb 10 '18 06:02 JunQiGenYuan

确实在windows下有这样的问题,楼上的解决了么?

16522855 avatar Mar 08 '18 09:03 16522855

@JunQiGenYuan 非常欢迎PR

@16522855 起初没有考虑Windows上的兼容性,是个问题。

skyFi avatar Mar 09 '18 05:03 skyFi

https://github.com/skyFi/weapp-native/pull/5 PR is proposed

Stupidism avatar Mar 10 '18 10:03 Stupidism