Skip to content

Conversation

@ahabhgk
Copy link
Contributor

@ahabhgk ahabhgk commented Jan 15, 2026

Summary

Derive a default target from rspack target for loader/plugin

Now we will have a compiler.target which is extracted from rspack's target options, it has platforms and esVersion

  • platforms contains the platform name and its version, used for:
    • builtin:swc-loader's default env.targets
    • builtin:lightningcss-loader's default targets
    • LightningCssMinimizerPlugin's default targets
  • esVersion is used for:
    • SwcJsMinimizerPlugin's default ecma version
    • builtin:swc-loader's default jsc.target (if platforms is not available)

and other plugin/loader can also access compiler.target to give a default target base on rspack's target

Related links

Checklist

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

@netlify
Copy link

netlify bot commented Jan 15, 2026

Deploy Preview for rspack-v2 canceled.

Name Link
🔨 Latest commit 852d5b8
🔍 Latest deploy log https://app.netlify.com/projects/rspack-v2/deploys/696a0b4689985900088a8900

@github-actions github-actions bot added release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack. labels Jan 15, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

📦 Binary Size-limit

Comparing 852d5b8 to chore: limit threads for codspeed benchmark (#12763) by CPunisher

🎉 Size decreased by 322.75KB from 47.99MB to 47.68MB (⬇️0.66%)

@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 5 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB -37.0 B (-0.0%)
react-1k 825.3 KB -29.0 B (-0.0%)
react-5k 2.7 MB -28.0 B (-0.0%)
rome 986.0 KB +1.9 KB (0.2%)
ui-components 2.1 MB -30.0 B (-0.0%)
📋 Detailed Reports (Click to expand)

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

📌 Baseline Commit: fe1e14c1d5 | PR: #12763

Metric Current Baseline Change
📊 Total Size 5.7 MB 5.7 MB -37.0 B (-0.0%)
📄 JavaScript 5.7 MB 5.7 MB -37.0 B (-0.0%)
🎨 CSS 21.0 B 21.0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: react-10k Bundle Diff

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

📌 Baseline Commit: fe1e14c1d5 | PR: #12763

Metric Current Baseline Change
📊 Total Size 825.3 KB 825.4 KB -29.0 B (-0.0%)
📄 JavaScript 825.3 KB 825.4 KB -29.0 B (-0.0%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: react-1k Bundle Diff

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

📌 Baseline Commit: fe1e14c1d5 | PR: #12763

Metric Current Baseline Change
📊 Total Size 2.7 MB 2.7 MB -28.0 B (-0.0%)
📄 JavaScript 2.7 MB 2.7 MB -28.0 B (-0.0%)
🎨 CSS 21.0 B 21.0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: react-5k Bundle Diff

📁 rome

Path: ../build-tools-performance/cases/rome/dist/rsdoctor-data.json

📌 Baseline Commit: fe1e14c1d5 | PR: #12763

Metric Current Baseline Change
📊 Total Size 986.0 KB 984.2 KB +1.9 KB (0.2%)
📄 JavaScript 986.0 KB 984.2 KB +1.9 KB (0.2%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: rome Bundle Diff

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

📌 Baseline Commit: fe1e14c1d5 | PR: #12763

Metric Current Baseline Change
📊 Total Size 2.1 MB 2.1 MB -30.0 B (-0.0%)
📄 JavaScript 2.0 MB 2.0 MB -30.0 B (-0.0%)
🎨 CSS 83.0 KB 83.0 KB 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: ui-components Bundle Diff

Generated by Rsdoctor GitHub Action

@ahabhgk ahabhgk force-pushed the default-loader-plugin-target-by-rspack-target branch from 86f4dcf to d69255c Compare January 16, 2026 05:02
@ahabhgk ahabhgk requested a review from h-a-n-a as a code owner January 16, 2026 07:07
@ahabhgk ahabhgk requested a review from LingyuCoder January 16, 2026 07:08
@hardfist hardfist merged commit bec0dda into v2 Jan 16, 2026
50 of 52 checks passed
@hardfist hardfist deleted the default-loader-plugin-target-by-rspack-target branch January 16, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants