Skip to content

Commit 3f56a60

Browse files
oneyouziyucongshuang
andauthored
ide里编译的时候inline-source-map模式下没有源文件 (#82)
* fix: ide设置成inline-source-map生成的文件没有源文件 fix:ide传过来的项目地址是小写开发 --------- Co-authored-by: yucongshuang <[email protected]>
1 parent a565c38 commit 3f56a60

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/hap-toolkit/src/commands/compile.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ showVersion()
4646
*/
4747
export function compile(platform, mode, watch, options = {}) {
4848
const errCb = options.onerror
49-
49+
// window下ide传过来的cwd的盘符是小写,需要转成大写
50+
if (options.cwd && options.cwd.charAt(1) === ':') {
51+
const cwd = options.cwd
52+
options.cwd = cwd.charAt(0).toUpperCase() + cwd.slice(1)
53+
}
5054
return new Promise(async (resolve, reject) => {
5155
colorconsole.attach(options.log)
5256
setCustomConfig(options.cwd)

0 commit comments

Comments
 (0)