-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Question] nullish coalescing (??) only work for Node.js version >= 14 #29
Comments
感谢你的反馈,似乎确实是个 bug, 如果你有兴趣排查,定位问题,并发个MR 修复的话,可以参考这个文档:https://github.com/JuniorTour/vue-template-babel-compiler/blob/main/CONTRIBUTING.md 有任何疑问可以随时联系我😁 |
The root cause is eg: SyntaxError: Unexpected token '?'
at new Function (<anonymous>)
at checkExpression (build.js:4550)
at checkNode (build.js:4508)
at checkNode (build.js:4504)
at checkNode (build.js:4504)
at detectErrors (build.js:4479)
at Object.compile (build.js:4808)
at compileTemplate (index.js:160)
at actuallyCompile (compileTemplate.js:72)
at compileTemplate (compileTemplate.js:33)
at Object.module.exports (templateLoader.js:46)
at LOADER_EXECUTION (LoaderRunner.js:119)
at runSyncOrAsync (LoaderRunner.js:120)
at iterateNormalLoaders (LoaderRunner.js:232)
at iterateNormalLoaders (LoaderRunner.js:221)
at LoaderRunner.js:236 But actually this code snippet of code will work after this compiler. So maybe we can disable this expression check? Temp workaround is:
|
Current behavior
https://github.com/LYSSION/vue-demo
环境:nodejs12.22.1
复现步骤
1.拉取仓库代码
2.npm run serve
3.向app.vue中添加
4.输出错误
The text was updated successfully, but these errors were encountered: