分享在IDE中跳转cocos源码方法

{
/* Base configuration. Do not edit this field. /
“extends”: “./temp/tsconfig.cocos.json”,
/
Add your custom configuration here. */
“compilerOptions”: {
“strict”: false,
“baseUrl”: “.”,
“paths”: {
“cc”: [
“/Applications/Cocos/Creator/3.8.3/CocosCreator.app/Contents/Resources/resources/3d/engine/typedoc-index.ts”
]
},
“types”: [
“./temp/declarations/cc.custom-macro”,
“./temp/declarations/jsb”,
“./temp/declarations/cc.env”
]
},
“exclude”: [
“node_modules”,
“library”,
“local”,
“temp”,
“build”,
“settings”,
“extensions”
]
}

2赞

找到你的tsconfig,复制粘贴以上代码,paths,cc里面改成自己本地引擎路径,ai写的,目前不知道会有什么问题,有懂的可以出来说下

重要的就这一段吧?

我测了一下,下面两段也是需要的,具体原因是啥不清楚,有大佬懂的可以解释下