我即将jsconfig.json与我现有的项目集成,以从其baseurl选项中受益。正如 vs-code 所示的模板,我将 jsconfig.json 添加到我的客户端文件夹(它有自己的 node_modules,与服务器完全分离)。但好像不起作用。同时,它在 jsconfig 文件的开头显示错误client/node_modules/harmony-reflect/index' not found,但是当我yarn addHarmony-reflect 到客户端模块时,错误仍然存在。这是代码:
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"components/*": ["./src/js/components/*"]
},
"module": "es6",
"target": "es2020"
},
"exclude": ["node_modules"]
}
Run Code Online (Sandbox Code Playgroud)
你们能帮我解决这个问题吗?谢谢!