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.
A small development helper that forces modules to reload cleanly when files change, covering both CommonJS and ESM flows.
loadCommonJS reads a fixture that increments a module-level counter, two calls without refresh return the same counter value, but inserting refresh([absolutePath]) between calls forces the next load to re-run the module and increment the counter again. @testloadESM twice without refresh yields the same value; after writing a new timestamp to disk and calling refresh([absolutePath]), the following loadESM resolves to the updated export. @testgetStats reports totalRefreshes of 2 and the three unique absolute paths in sorted order. @test@generates
export type RefreshResult = {
refreshed: string[];
timestamp: number;
};
export interface CacheReloaderOptions {
/**
* Resolves a caller-provided path (relative or absolute) to an absolute path
* before cache busting.
*/
resolvePath(file: string): string;
/** Optional callback when refresh completes */
onRefresh?: (refreshed: string[]) => void;
}
export function createCacheReloader(options: CacheReloaderOptions): {
/** Refresh caches for the provided files (absolute after resolution). */
refresh(paths: string[]): RefreshResult;
/** Require a CommonJS module after ensuring caches are clear. */
loadCommonJS<T = unknown>(path: string): T;
/** Dynamically import an ESM module with cache busting applied. */
loadESM<T = unknown>(path: string): Promise<T>;
/** Return cumulative refresh statistics. */
getStats(): {
totalRefreshes: number;
uniquePaths: string[];
};
};Provides Node-focused cache clearing utilities and an auto-registered loader that appends cache-busting identifiers to ESM imports.
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