Skip to content
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

条件编译注释匹配逻辑导致的编译错误 #5368

Open
minisheeep opened this issue Mar 27, 2025 · 0 comments
Open

条件编译注释匹配逻辑导致的编译错误 #5368

minisheeep opened this issue Mar 27, 2025 · 0 comments

Comments

@minisheeep
Copy link

发行方式

小程序

具体平台

微信小程序

开发环境

Windows

项目创建方式

CLI命令行

依赖版本

3.0.0-4030620241128001

问题描述

一些内联 glsl 代码的依赖同样会包含 #endif 注释,代码经过裁剪后会导致编译报错 。
相关问题#4524
uni:pre 插件里的判断太简陋了,麻烦修改下

const hasEndif = isPre && code.includes('#endif')

重现步骤

npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project

在 main.ts
import * as N8ao from 'n8ao';
console.log(N8ao);

编译任意小程序

期望行为

正常编译

实际行为

编译报错 [plugin:uni:mp-main-js] Unbalanced delimiter found in string

截图或录屏

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant