Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个依赖在
renderer-react
下,不在preset-umi
包里面,在 pnpm 严格的依赖结构下是获取不到的吧(此问题无法在此仓库内测试出来,但一般认为require.resolve
在严格模式下只能取自己包的依赖)。如果非要找这个包的绝对位置,应该先找
renderer-react
,之后基于renderer-react
的位置作为起点找react-helmet-async
(参考plugins/src/react-query
里找@tanstack/query-core
的位置的代码)。为了避免找绝对路径比较麻烦,值直接写包名可以吗?