Skip to content

refactor: integrate swc api into rspack_javascript_compiler#10186

Merged
GiveMe-A-Name merged 14 commits intomainfrom
refactor/javascript-compiler
Apr 25, 2025
Merged

refactor: integrate swc api into rspack_javascript_compiler#10186
GiveMe-A-Name merged 14 commits intomainfrom
refactor/javascript-compiler

Conversation

@GiveMe-A-Name
Copy link
Member

@GiveMe-A-Name GiveMe-A-Name commented Apr 25, 2025

Summary

Integrate swc api into rspack_javascript_compiler.
rspack_javascript_compiler provide transform, minify and parser api to rspack_loader_swc, 'rspack_plugin_javascript'.
The new architecture would be like

graph TB
    subgraph swc
        A[swc core]
        B[swc common]
        C[swc ecma minifier]
        D[swc ...]
    end

    E[rspack_javascript_compiler] --> A
    E --> B
    E --> C
    E --> D

    subgraph plugins
        F[rspack_plugin_javascript]
        G[rspack_plugin_swc_js_minimizer]
        H[node binding]
    end

    F --> E
    G --> E
    H --> E
Loading

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Apr 25, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit ce96273
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/680b53bf4657810008709a35

@GiveMe-A-Name GiveMe-A-Name marked this pull request as draft April 25, 2025 09:04
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 25, 2025
@GiveMe-A-Name GiveMe-A-Name requested review from SyMind and h-a-n-a April 25, 2025 09:35
@GiveMe-A-Name GiveMe-A-Name marked this pull request as ready for review April 25, 2025 09:36
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 25, 2025

CodSpeed Performance Report

Merging #10186 will not alter performance

Comparing refactor/javascript-compiler (ce96273) with main (769c4a5)

🎉 Hooray! codspeed-node just leveled up to 4.0.1!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 11 untouched benchmarks

@GiveMe-A-Name GiveMe-A-Name merged commit 7f1a5e3 into main Apr 25, 2025
36 checks passed
@GiveMe-A-Name GiveMe-A-Name deleted the refactor/javascript-compiler branch April 25, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants