-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
依赖中代码出现匹配编译器宏导致报错 #4524
Comments
或者官方好好重写下这个编译宏的逻辑,但我觉得不大可能了,有遇到类似 |
感谢反馈,你提到了如果 endif 结束逻辑可以忽略 node_modules ,并且提到了 |
时间有点太久了 原先的项目应该是用ol渲染地图,然后它的依赖中有 https://github.com/nodeca/pako 这个库,然后里面有 uni-app 编译宏作注释的,虽然也是成一对的,但不知道为什么没正常处理会报错,然后就patch解决了 |
我也遇到了这个问题Unbalanced delimiter found in string 请问是怎么解决的 |
我按enpitsuLin所说的对esbuildPrePlugin.js做了修改,但是在app打包测试的时候又出现了这个错误。我也用了有pako依赖的包。 请问能解决下吗? |
初步排除应该是使用了 ol 其中的依赖引用到了不同版本的 pako 这个库, 而 uniapp 中也用到了(可能不是这个原因)
然后在预处理这个库的代码中匹配到了类似
# ifdef
的宏 但是没有结束语句, 然后最后会报Unbalanced delimiter found in string
workaround
用户可以打个 patch 跳过对 node_modules 中依赖的预处理, 这个修复方法应该是蛮合理的,官方看看可以不可以合并得了
The text was updated successfully, but these errors were encountered: