Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: skip internal dep when type is pages, closes #2049 #2050

Merged
merged 1 commit into from May 19, 2023

Conversation

LeoYuan
Copy link
Contributor

@LeoYuan LeoYuan commented May 18, 2023

fixes #2049

@github-actions
Copy link

ChatGPT Code Review:

  1. 代码本身没有拼写和语法错误,也没有出现明显的逻辑错误。修改建议为:可以对代码进行进一步优化,比如可以将getInternalDep()函数中的一行代码合并到一行,使代码更精简。

  2. 该代码修复了一个内部依赖的问题。具体来说,getInternalDep()函数中的代码会返回一个内部依赖(InternalDependency),当且仅当该依赖的类型不为页面(InternalDependencyType.PAGE)。之后,在分析容器内部组件依赖时,如果依赖名称存在于internalDeps中,则获取该依赖;否则,获取compDeps中的依赖。最后,对container.deps数组进行过滤,滤除其中的无效值(null 或 undefined)。

@liujuping liujuping merged commit be4b164 into develop May 19, 2023
7 checks passed
@liujuping liujuping deleted the fix/code-gen-internal-page branch May 19, 2023 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants