MCPcopy
hub / github.com/tailwindlabs/tailwindcss / importModule

Function importModule

packages/@tailwindcss-node/src/compile.ts:181–195  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

179// can be resolved properly.
180let jiti: null | Jiti = null
181async function importModule(path: string): Promise<any> {
182 if (typeof globalThis.__tw_load === 'function') {
183 let module = await globalThis.__tw_load(path)
184 if (module) {
185 return module
186 }
187 }
188
189 try {
190 return await import(path)
191 } catch (error) {
192 jiti ??= createJiti(import.meta.url, { moduleCache: false, fsCache: false })
193 return await jiti.import(path)
194 }
195}
196
197const modules = [
198 'node_modules',

Callers 1

loadModuleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected