We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题描述 抖音小程序模式下,在模板中使用wx:class指令,给它赋值一个对象报错 代码如下:
抖音开发者工具编译报错: 编译警告 [Compile TTML error] Error parsing JavaScript expression: Expecting Unicode escape sequence \uXXXX. (1:30) at pages/index.ttml (1:115)
环境 mpx版本:v2.8.11 使用的命令:mpx-cli-service serve:mp --targets=tt
思考 貌似是由于编译出来的ttml文件中的反斜杠加双引号引起的错误,如果把反斜杠和双引号去掉换成单引号则正常
The text was updated successfully, but these errors were encountered:
是windows系统吗
Sorry, something went wrong.
是windows系统,但最先是在同事的mac电脑上发现的,我在windows系统上也复现出来了
我这本地尝试两个版本的cli创建的项目都没有复现你说的这个问题,上传一个复现demo吧
抱歉,确实不是mpx的问题。 之前在 #860 找到了一个Tailwindcss的解决方案,装了MiniProgramTailwindWebpackPlugin这个插件,发现正是这个插件引起的问题。
MiniProgramTailwindWebpackPlugin
没用这个插件时,编译出来的是: <view class='{{__stringify__.stringifyClass("", {red:red})}}'></view>
<view class='{{__stringify__.stringifyClass("", {red:red})}}'></view>
用了这个插件时,编译出来的是: <view class="{{__stringify__.stringifyClass(\"\",{red:red})}}"></view> 然后就会报错了
<view class="{{__stringify__.stringifyClass(\"\",{red:red})}}"></view>
No branches or pull requests
问题描述
抖音小程序模式下,在模板中使用wx:class指令,给它赋值一个对象报错
代码如下:
抖音开发者工具编译报错:
编译警告 [Compile TTML error] Error parsing JavaScript expression: Expecting Unicode escape sequence \uXXXX. (1:30)
at pages/index.ttml (1:115)
环境
mpx版本:v2.8.11
使用的命令:mpx-cli-service serve:mp --targets=tt
思考
貌似是由于编译出来的ttml文件中的反斜杠加双引号引起的错误,如果把反斜杠和双引号去掉换成单引号则正常
The text was updated successfully, but these errors were encountered: