feat!: default loader/plugin target by rspack target#12752
Conversation
✅ Deploy Preview for rspack-v2 canceled.
|
📦 Binary Size-limit
🎉 Size decreased by 322.75KB from 47.99MB to 47.68MB (⬇️0.66%) |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 5 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 react-10kPath:
📦 Download Diff Report: react-10k Bundle Diff 📁 react-1kPath:
📦 Download Diff Report: react-1k Bundle Diff 📁 react-5kPath:
📦 Download Diff Report: react-5k Bundle Diff 📁 romePath:
📦 Download Diff Report: rome Bundle Diff 📁 ui-componentsPath:
📦 Download Diff Report: ui-components Bundle Diff Generated by Rsdoctor GitHub Action |
86f4dcf to
d69255c
Compare
Summary
Derive a default target from rspack target for loader/plugin
Now we will have a
compiler.targetwhich is extracted from rspack's target options, it hasplatformsandesVersionplatformscontains the platform name and its version, used for:builtin:swc-loader's defaultenv.targetsbuiltin:lightningcss-loader's defaulttargetsLightningCssMinimizerPlugin's defaulttargetsesVersionis used for:SwcJsMinimizerPlugin's defaultecmaversionbuiltin:swc-loader's defaultjsc.target(ifplatformsis not available)and other plugin/loader can also access
compiler.targetto give a default target base on rspack's targetRelated links
Checklist