-
Notifications
You must be signed in to change notification settings - Fork 13
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
Unsupported syntax "optionalChainingAssign" #37
Comments
你是不是安装了 import vue from '@vitejs/plugin-vue'
import TurboConsole from 'unplugin-turbo-console/vite'
import babel from 'vite-plugin-babel';
export default defineConfig({
plugins: [
vue(),
babel(),
TurboConsole(), // 放在babel后面
],
}) |
并没有,没有安装任何babel之类的扩展插件,就是基于vite的,vite默认是支持这类语法的,很奇怪的是我其他地方写这种语法没事,就这个地方用了就显示这个错误 |
把unplugin-turbo-console禁用了,还会不会有这个错误 |
在最新的beta版本(1.8.8-beta.1)中把插件内部的babel插件选项暴露出来了,可以升级到最新的beta版本再尝试一下。 export default defineConfig({
plugins: [
vue(),
TurboConsole({
babelParserPlugins: [
['optionalChainingAssign', {version: '2023-07'}]
]
}),
],
}) |
更新到beta后设置了这个配置后就没有报错问题了,应该就是内部这个配置导致的问题 |
已在v1.8.8 发布. |
Describe the bug
不支持链式判断的语法,如下图所示
Reproduction
null
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: