小程序在开发环境以及安卓体验版都没有问题,但是iOS的体验版某个页面白屏,打开日志报错如下
All Log Info Warn Error
invoked
preloadSubpackages: success
MiniProgramError SyntaxError
at line:2490.column:2095832,SyntaxError: Invalid regular expression: invalid group specifier name Stack: (native code) at evaluateScriptFile
(WAServiceMainContext.js:2:2095832) at (WAServiceMainContext.js:2:2101868 at forEach (native code)
at b(WAServiceMainContext.js:2:2101782) at(WAServiceMainContextjs:2:2102507) at v(WAServiceMainContext.js:2:74121) at y(WAServiceMainContext.js:2:74433) at (WAServiceMainContext.js:2:2102321) at(WAServiceMainContext.js:2:2098697) at (WAServiceMainContext.js:2:191499) at forEach (native code)
at (WAServiceMainContext.js:2:191470) at k(WAServiceMainContext.js:2:70026) global code
Clear Hide
查了两天发现问题原因是 iOS不支持正则的前瞻后顾
写正则的是很深的页面 但是因为这个问题导致前几个入口文件都是白屏
所以出现这种只有iOS白屏的一定要逐个检查页面的正则