> path.extname()
TypeError: Path must be a string. Received undefined
at assertPath (path.js:7:11)
at Object.extname (path.js:1431:5)
at repl:1:6
at sigintHandlersWrap (vm.js:22:35)
at sigintHandlersWrap (vm.js:73:12)
at ContextifyScript.Script.runInThisContext (vm.js:21:12)
at REPLServer.defaultEval (repl.js:346:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer.<anonymous> (repl.js:545:10)
path.extname
在 node 4.x 下传入undefined
不会报错返回''
,但在 6.x 下会报错:因为 grunt-kmc 这一行可能会传入
undefined
给depFileName
: https://github.com/daxingplay/grunt-kmc/blob/master/tasks/kmc.js#L127