Node.js-specific utilities and runtime functionality for Tailwind CSS v4, providing compilation tools, module dependency analysis, source map handling, path normalization, and optimization utilities.
Transforms CSS asset references to absolute paths rooted at a provided project base while keeping external/data references intact. Relative URLs are resolved against the directory containing the provided source path before the project root prefix is applied.
background:url("../images/hero.png") from a stylesheet at /styles/home.css with project root /static, rewrite to background:url("/static/images/hero.png") without altering other declarations. @test/, http, https, protocol-relative //, or data: remain unchanged while adjacent relative URLs still rewrite. @testimage-set(url("./sprite-1x.png") 1x, url("./sprite-2x.png") 2x) from /styles/icons.css with project root /assets rewrites to /assets/sprite-1x.png and /assets/sprite-2x.png. @testurl("./fonts/my font.woff2") -> url("/static/fonts/my font.woff2")). @test@generates
export interface RewriteOptions {
projectRoot: string; // target root prefix for rewritten asset paths
sourcePath: string; // absolute path to the stylesheet containing the CSS
}
export function rewriteAssetUrls(css: string, options: RewriteOptions): string;Provides CSS URL parsing and rewriting utilities to normalize asset references.
tessl i tessl/npm-tailwindcss--node@4.1.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10