MCPcopy
hub / github.com/nuxt-modules/tailwindcss / reloadConfigTemplate

Function reloadConfigTemplate

src/internal-context/load.ts:243–251  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

241 if (twCtx.use().meta?.disableHMR) return
242
243 const reloadConfigTemplate = async () => {
244 const { dst } = twCtx.use()
245 await loadConfigs()
246
247 setTimeout(async () => {
248 await updateTemplates({ filter: t => t.dst === dst || dst?.endsWith(t.filename) || false })
249 await nuxt.callHook('tailwindcss:internal:regenerateTemplates', { configTemplateUpdated: true })
250 }, 100)
251 }
252
253 nuxt.hook('app:templatesGenerated', async (_app, templates) => {
254 if (Array.isArray(templates) && templates?.some(t => Object.keys(configUpdatedHook).includes(t.dst))) {

Callers 1

registerHooksFunction · 0.85

Calls 1

loadConfigsFunction · 0.85

Tested by

no test coverage detected