Skip to content

Comments

feat!: enable css by default#12744

Merged
hardfist merged 1 commit intov2from
enable-css
Jan 19, 2026
Merged

feat!: enable css by default#12744
hardfist merged 1 commit intov2from
enable-css

Conversation

@JSerFeng
Copy link
Contributor

@JSerFeng JSerFeng commented Jan 15, 2026

Summary

Breaking change

Remove experiments.css, css parser and generator have already been registered. If you want to enable it, you can set the type in rule options, just like asset module

module.exports = {
  module: {
    rules: [
      {
         test: /\.css$/i,
         type: 'css/auto'
      },
    ]
  }
}

There are 3 types you can use

  • 'css': normal css
  • 'css/module': for css modules
  • 'css/auto': detect the file extension to determine the module type

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 ready!

Name Link
πŸ”¨ Latest commit ba5706c
πŸ” Latest deploy log https://app.netlify.com/projects/rspack-v2/deploys/696dec3f4267fb000814abec
😎 Deploy Preview https://deploy-preview-12744--rspack-v2.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@JSerFeng JSerFeng changed the title refactor: enable css by default refactor!: enable css by default Jan 15, 2026
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Jan 15, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 15, 2026

πŸ“¦ Binary Size-limit

Comparing ba5706c to fix: sort css by sourceorder, esm import comes first (#12778) by Fy

πŸŽ‰ Size decreased by 322.13KB from 47.99MB to 47.68MB (⬇️0.66%)

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 15, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing enable-css (ba5706c) with v2 (fbd5b66)

Summary

βœ… 16 untouched benchmarks
⏩ 1 skipped benchmark1

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports. ↩

@github-actions
Copy link
Contributor

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%)
ui-components 2.1 MB -30.0 B (-0.0%)
rome 985.8 KB +1.7 KB (0.2%)
πŸ“‹ Detailed Reports (Click to expand)

πŸ“ react-10k

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

πŸ“Œ Baseline Commit: 6991b7b596 | PR: #12778

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: 6991b7b596 | PR: #12778

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: 6991b7b596 | PR: #12778

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

πŸ“ ui-components

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

πŸ“Œ Baseline Commit: 6991b7b596 | PR: #12778

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

πŸ“ rome

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

πŸ“Œ Baseline Commit: 6991b7b596 | PR: #12778

Metric Current Baseline Change
πŸ“Š Total Size 985.8 KB 984.2 KB +1.7 KB (0.2%)
πŸ“„ JavaScript 985.8 KB 984.2 KB +1.7 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

Generated by Rsdoctor GitHub Action

@hardfist hardfist changed the title refactor!: enable css by default feat!: enable css by default Jan 19, 2026
@hardfist hardfist merged commit 7cef317 into v2 Jan 19, 2026
82 of 87 checks passed
@hardfist hardfist deleted the enable-css branch January 19, 2026 11:25
@github-actions github-actions bot added release: feature release: feature related release(mr only) and removed release: refactor labels Jan 19, 2026
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.

2 participants