Skip to content

fix(css): apply CSS modules to ?inline imports - #1120

Open
lazerg wants to merge 1 commit into
rolldown:mainfrom
lazerg:fix/issue-1119-css-modules-inline
Open

lazerg wants to merge 1 commit into
rolldown:mainfrom
lazerg:fix/issue-1119-css-modules-inline

Conversation

@lazerg

@lazerg lazerg commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

AI usage

  • No AI was used in this PR.
  • AI was used:
    • I have carefully reviewed the AI-generated content myself.

Description

Importing a .module.css file with ?inline returned the raw CSS with unscoped class names, so the string never matched the class names from the regular import. The compile step skipped CSS modules for every ?inline id. Now ?inline module files are scoped the same way, which matches Vite. The inline import still only exports the CSS string.

Linked Issues

Fixes #1119

Additional context

The new tests cover both Lightning CSS and PostCSS. They fail on main and pass here.

@netlify

netlify Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tsdown-main ready!

Name Link
🔨 Latest commit 0b9e1b8
🔍 Latest deploy log https://app.netlify.com/projects/tsdown-main/deploys/6ae8aa04cf5d06380d1e98e6
😎 Deploy Preview https://deploy-preview-1120--tsdown-main.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@pkg-pr-new

pkg-pr-new Bot commented Nov 2, 2026

Copy link
Copy Markdown

Open in StackBlitz

tsdown

pnpm add https://pkg.pr.new/rolldown/tsdown@1120 -D
npm i https://pkg.pr.new/rolldown/tsdown@1120 -D
yarn add https://pkg.pr.new/rolldown/tsdown@1120.tgz -D

create-tsdown

pnpm add https://pkg.pr.new/rolldown/tsdown/create-tsdown@1120 -D
npm i https://pkg.pr.new/rolldown/tsdown/create-tsdown@1120 -D
yarn add https://pkg.pr.new/rolldown/tsdown/create-tsdown@1120.tgz -D

@tsdown/css

pnpm add https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1120 -D
npm i https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1120 -D
yarn add https://pkg.pr.new/rolldown/tsdown/@tsdown/css@1120.tgz -D

@tsdown/exe

pnpm add https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1120 -D
npm i https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1120 -D
yarn add https://pkg.pr.new/rolldown/tsdown/@tsdown/exe@1120.tgz -D

tsdown-migrate

pnpm add https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1120 -D
npm i https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1120 -D
yarn add https://pkg.pr.new/rolldown/tsdown/tsdown-migrate@1120.tgz -D

commit: 0b9e1b8

This branch has not been deployed

No deployments
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.

@tsdown/css: CSS Modules aren't applied to ?inline imports, so class names don't match

1 participant