You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/loader.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,18 @@
2
2
3
3
`@knighted/css/loader` lets bundlers attach compiled CSS strings to any module by appending the `?knighted-css` query when importing. The loader mirrors the module graph, compiles every CSS dialect it discovers (CSS, Sass, Less, vanilla-extract, etc.), and exposes the concatenated result as `knightedCss`.
4
4
5
+
## Loader vs bridge (quick comparison)
6
+
7
+
Use this table to decide which loader you need before wiring up rules:
| Input | Original JS/TS module source + its style imports | Compiled CSS Modules output (post-hash) |
12
+
| CSS extraction | Yes (walks the import graph) | No (wraps upstream output) |
13
+
| Export behavior | Appends `knightedCss` (and optional selector exports) onto the original module | Exposes `knightedCss`/`knightedCssModules` only; does **not** re-export JS/TS module exports |
14
+
| When to use | Default choice for `?knighted-css` in JS/TS modules | When you need hashed CSS Modules output for runtime `knightedCss`|
15
+
| Combined wrapper needed? | Only for explicit `?knighted-css&combined` usage |**Yes** if you still need original JS/TS exports (use `&combined` via the resolver plugin) |
Copy file name to clipboardExpand all lines: packages/css/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "@knighted/css",
3
-
"version": "1.2.0-rc.0",
3
+
"version": "1.2.0-rc.1",
4
4
"description": "A build-time utility that traverses JavaScript/TypeScript module dependency graphs to extract, compile, and optimize all imported CSS into a single, in-memory string.",
0 commit comments