我有一个使用 Typescript 和 @babel/preset-env 的项目。与 Webpack 捆绑失败并显示此错误和以下配置。
如果我取消注释强制@babel/plugin-proposal-optional-chaining包含的行,则编译有效。如果我将 Safari、Edge 或 IE 11 添加到targets字符串中,它也可以工作。
这是为什么?
ERROR in ./src/bla.ts 58:23
Module parse failed: Unexpected token (58:23)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
> if (foo?.bar === undefined) {
Run Code Online (Sandbox Code Playgroud)
ERROR in ./src/bla.ts 58:23
Module parse failed: Unexpected token (58:23)
File was processed with these loaders:
* ./node_modules/babel-loader/lib/index.js
You may need an additional loader to …Run Code Online (Sandbox Code Playgroud) 我有一个基本的 MARP 演示文稿,https://github.com/marp-team/marp。我想添加链接来模拟脚注或参考文献。可以吗,导出PDF怎么样?
Some text with source. [1]
Run Code Online (Sandbox Code Playgroud)
“1”应该链接到另一张幻灯片:
1. some description
Run Code Online (Sandbox Code Playgroud)
PS 我没有足够的声誉来marp为这个问题创建标签,如 MARP 自述文件所述。