Uh oh!
There was an error while loading. Please reload this page.
Conversation
Waiting for #48 revert. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov Report
@@ Coverage Diff @@## master #47 +/- ##
==========================================
+ Coverage 99.15% 99.60% +0.44%
==========================================
Files 6 6 Lines 237 252 +15 Branches 46 50 +4 ==========================================
+ Hits 235 251 +16 + Misses 2 1 -1
Continue to review full report at Codecov.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| // read `egg.require` from package.json | ||
| if (argv.require && Array.isArray(argv.require)) { |
There was a problem hiding this comment.
这段是不是该放在 for 前面,不然 pkgInfo 的 require 和 --require 会覆盖?我们应该是需要合并。
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| } | ||
| delete argv.require; |
There was a problem hiding this comment.
argv.require 有哪里插入到 execArgvObj.require 了么?(不确定 common-bin 里面的逻辑是否执行了)
下面那个单测,多加个 --require 验证下是否合并了。
There was a problem hiding this comment.
这边,这样顺便也解决了 --require 只能传递全路径的易用性(并且兼容以前的全路径传递),两边合并下作为 execObject 传递逻辑上清晰一些
There was a problem hiding this comment.
Checklist
npm testpassesAffected core subsystem(s)
Description of change
support:
The current
pkgInfo.eggScriptConfig.requireneed to provide full path, this pr aims to support relative path & npm pkg.