Skip to content

fix(css): process CSS files with plugin queries like Vue <style src> - #1097

Open
pont1s wants to merge 1 commit into
rolldown:mainfrom
pont1s:fix/issue-1095-item-2
Open

pont1s wants to merge 1 commit into
rolldown:mainfrom
pont1s:fix/issue-1095-item-2

Conversation

@pont1s

@pont1s pont1s commented Oct 13, 2026

Copy link
Copy Markdown

AI usage

  • No AI was used in this PR.
  • AI was used: Claude Code + Claude Opus 5.5 Hight
  • I have carefully reviewed the AI-generated content myself.

Description

shouldSkipTransform skipped every real CSS file with a query, so Vue SFC <style src="./Button.css" scoped> (id Button.css?vue&type=style&index=0&scoped=…&lang.css) was never compiled or collected.

  • A CSS file with a query is now processed when the id still ends with a CSS extension (&lang.css, &lang.module.scss) the same signal Rolldown uses to treat a module as CSS. ?raw, ?url, ?bytes, ?worker, ?sharedworker (as in Vite's SPECIAL_QUERY_RE) and queries without a CSS tail keep the previous behavior.
  • With the lightningcss transformer, such files are bundled from their real path, so @import inside a <style src> file is inlined (matching plain CSS imports and the postcss transformer).

Linked Issues

#1095

`shouldSkipTransform` skipped every real CSS file with a query, so ids such
as `Button.css?vue&type=style&index=0&scoped=…&lang.css` (Vue SFC
`<style src="./Button.css">`) were left as `css` modules and Rolldown failed
with `[UNSUPPORTED_FEATURE] Bundling CSS is no longer supported`.

Now a CSS file with a query is processed when the id still ends with a CSS
extension (e.g. `&lang.css`); `?raw`, `?url`, `?bytes`, `?worker` and other
queries without a CSS tail are still left to other plugins. With
lightningcss, such files are bundled from the real path so `@import` is
inlined, matching plain CSS imports and the postcss transformer.

refs rolldown#1095

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 13, 2026 00:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@netlify

netlify Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for tsdown-main ready!

Name Link
🔨 Latest commit d72fa79
🔍 Latest deploy log https://app.netlify.com/projects/tsdown-main/deploys/6acd7f0474d406a3ab3ccbc1
😎 Deploy Preview https://deploy-preview-1097--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 Oct 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

tsdown

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

create-tsdown

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

@tsdown/css

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

@tsdown/exe

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

tsdown-migrate

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

commit: d72fa79

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.

2 participants