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

feat: improve rs plugin and js hooks #855

Merged
merged 8 commits into from
Jan 11, 2024
Merged

feat: improve rs plugin and js hooks #855

merged 8 commits into from
Jan 11, 2024

Conversation

sorrycc
Copy link
Member

@sorrycc sorrycc commented Jan 11, 2024

RFC 是 #836 。做了一些改动,先提 pr 了。还会有后续其他改动。

1、rs plugin 新增 build_start 和 generate_end 两个 hook
2、js plugin 通过同一个 rs plugin 管理
3、js plugin 新增 buildStart
4、js plugin 修改 onBuildComplete 为 generateEnd,参数不变,但 build 时也会执行
5、js plugin 删除 onCompileLess,通过 load 来实现
6、js plugin 新增 load,入参是 path,返回 Promise<{ content: string, type: 'css'|'javascript' }>
7、js plugin 修改 on_generate_file 为 _on_generate_file,因为目前只在 bundless 场景下使用,还没想好怎么对三方用户公开使用,先用私有的方式
8、tsfn.rs 里写地比较丑和重复,后续会用宏来重写下部分函数

@sorrycc sorrycc merged commit c1dbfbf into master Jan 11, 2024
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the sorrycc-g5qh branch January 11, 2024 02:53
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.

1 participant