Skip to content

feat: add unstable_css_imports option#655

Merged
bartlomieju merged 2 commits into
denoland:mainfrom
bartlomieju:feat/unstable-css-imports
Jun 10, 2026
Merged

feat: add unstable_css_imports option#655
bartlomieju merged 2 commits into
denoland:mainfrom
bartlomieju:feat/unstable-css-imports

Conversation

@bartlomieju

Copy link
Copy Markdown
Member

Adds an unstable_css_imports build option, mirroring the existing
unstable_text_imports and unstable_bytes_imports options. When enabled,
a css import attribute type is accepted and the import is recorded as an
asset edge (external module) in the graph; when disabled, it errors with
the same unsupported import attribute type error as before.

This unblocks CSS module scripts
(import sheet from "./a.css" with { type: "css" }) in Deno behind
--unstable-raw-imports, prototyped in denoland/deno#35093 (towards
denoland/deno#11961). Once this lands and is released, the analyzer-level
workaround in that PR (remapping css to text for graph building) can
be replaced with this option.

Allows a 'css' import attribute type to be treated as an asset import
(like text/bytes), recorded as an external module in the graph. Used by
Deno's CSS module scripts prototype behind --unstable-raw-imports.
@bartlomieju bartlomieju merged commit 8d2d3ca into denoland:main Jun 10, 2026
17 checks passed
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.

1 participant