resolve.ts — tailwindcss Source File
Architecture documentation for resolve.ts, a typescript file in the tailwindcss codebase. 3 imports, 1 dependents.
Entity Profile
Dependency Diagram
graph LR d2f15571_c3bc_bfbb_165e_18eba9d341ba["resolve.ts"] 42ab2a4a_69df_1786_54b8_5b623677fb89["enhanced-resolve"] d2f15571_c3bc_bfbb_165e_18eba9d341ba --> 42ab2a4a_69df_1786_54b8_5b623677fb89 9c72d32d_a535_69d4_565b_b620ce2eaae1["node:fs"] d2f15571_c3bc_bfbb_165e_18eba9d341ba --> 9c72d32d_a535_69d4_565b_b620ce2eaae1 e4678476_089a_67ea_0736_1746fce3e551["node:module"] d2f15571_c3bc_bfbb_165e_18eba9d341ba --> e4678476_089a_67ea_0736_1746fce3e551 cc1a3f06_4b21_684c_487a_f342bd18d772["renderer.ts"] cc1a3f06_4b21_684c_487a_f342bd18d772 --> d2f15571_c3bc_bfbb_165e_18eba9d341ba style d2f15571_c3bc_bfbb_165e_18eba9d341ba fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import EnhancedResolve from 'enhanced-resolve'
import fs from 'node:fs'
import { createRequire } from 'node:module'
const localResolve = createRequire(import.meta.url).resolve
export function resolve(id: string) {
if (typeof globalThis.__tw_resolve === 'function') {
let resolved = globalThis.__tw_resolve(id)
if (resolved) {
return resolved
}
}
return localResolve(id)
}
const resolver = EnhancedResolve.ResolverFactory.createResolver({
fileSystem: new EnhancedResolve.CachedInputFileSystem(fs, 4000),
useSyncFileSystemCalls: true,
extensions: ['.css'],
mainFields: ['style'],
conditionNames: ['style'],
})
export function resolveCssId(id: string, base: string) {
if (typeof globalThis.__tw_resolve === 'function') {
let resolved = globalThis.__tw_resolve(id, base)
if (resolved) {
return resolved
}
}
return resolver.resolveSync({}, base, id)
}
Domain
Subdomains
Functions
Dependencies
- enhanced-resolve
- node:fs
- node:module
Imported By
Source
Frequently Asked Questions
What does resolve.ts do?
resolve.ts is a source file in the tailwindcss codebase, written in typescript. It belongs to the CommandLineInterface domain, Renderer subdomain.
What functions are defined in resolve.ts?
resolve.ts defines 2 function(s): resolve, resolveCssId.
What does resolve.ts depend on?
resolve.ts imports 3 module(s): enhanced-resolve, node:fs, node:module.
What files import resolve.ts?
resolve.ts is imported by 1 file(s): renderer.ts.
Where is resolve.ts in the architecture?
resolve.ts is located at packages/@tailwindcss-cli/src/utils/resolve.ts (domain: CommandLineInterface, subdomain: Renderer, directory: packages/@tailwindcss-cli/src/utils).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free