Cocos Creator v1.5.0 beta.4.1 编译 BUG

当前环境下有 .d.ts 和 自定义的 js 插件文件 编译时出现错误

TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.extname (path.js:1433:5)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/page/refine-sourcemap.js:1:1276
at Array.forEach (native)
at SourceMapConsumer_eachMapping [as eachMapping] (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/source-map/lib/source-map-consumer.js:155:16)
at merge (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/page/refine-sourcemap.js:1:1146)
at refineSourceMap (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/page/refine-sourcemap.js:1:2190)
at Stream. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/page/refine-sourcemap.js:1:2366)
at Stream.stream.write (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/through/index.js:26:11)
at write (/Applications/CocosCreator.app/Contents/Resources/app.asar/node_modules/vinyl-buffer/node_modules/readable-stream/lib/_stream_readable.js:623:24)
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/compiler.js:1:1022
at /Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/compiler.js:1:466
at BrowserWindow. (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/compiler.js:1:2045)
at BrowserWindow.g (events.js:286:16)
at emitOne (events.js:101:20)
at BrowserWindow.emit (events.js:188:7)

经过确认
我把工程中自定的的d.ts文件删掉就可以编译正常

我在 d.ts文件顶部加入
export class _{

}
后编译正常 暂时解决问题

d.ts 文件是为了在 vscode 里明确类型而使用的吧,这类文件可以不放在 assets 下面,这样可以不被 creator 编译,也能够发挥类型提示功能。

但是 我是引用了一个文件夹 框架 作为子项目 包含很多了 js 和 d.ts 文件 。 用于现在typescript的访问
js文件 我勾选了 插件 可以提前被执行

但是如果js和d.ts要四处分离的话 显得非常得乱噢。 希望能自动忽略 d.ts 跳过编译

了解了,我记录一下这个需求

1赞