-
Notifications
You must be signed in to change notification settings - Fork 70
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
refact: build #923
Merged
Merged
refact: build #923
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
* refactor: treats ignore module as normal module * refactor: update LoadError * fix: typo * refact: no need to mark ignored on File * chore: code style * chore: code style
…uild # Conflicts: # crates/mako/src/plugins/minifish/inject.rs
* fix: let async imports bundled into separate chunks * fix: e2e javascript.require-dynamic
* refactor: minimum tokio thread pool * refact: use a static rayon thread pool * refact: import style * refact: code style * refact: import style
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge 到此 PR 的 PR(需要在 Changelog 里提及):
修改点:
1、重构了 build 部分,涉及部分数据结构调整,所以对非 build 部分也有改动
2、新增了几个模块,file、visitors
3、重写了几个模块,ast_2、build_2、load_2、parse_2、transform_2、analyze_deps_2
4、删除了几个模块,task
5、模块说明
1)ast_2 是通用模块,负责 ast 的一生,传入 file,然后就可以做 parse、transform、analyze_deps 和 generate
2)file 包含文件相关的所有信息
3)load_2、parse_2、transform_2、analyze_deps_2 是 ast 在 build 阶段的生命周期,基于 ast_2,同时加入 build 相关的逻辑和需求
4)resolve 我放到 analyze_deps_2 内部做了
5)visitors 和 folders 统一放 visotors 下,不区分 transform 和 transform_in_generate
6、重构 build_2,简化逻辑,650+ 行 > 250+ 行
7、把大量 plugin 功能内置,减少复杂度
8、optimize_package_imports 先下掉,等调整后重新上,现在和 build 和 module 模块耦合,增加了复杂度
9、重构 plugins/runtime,手动提供,不走编译,无需依赖 @swc_helpers,减少复杂性
...
TODO: