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

Function loadModule

packages/tailwindcss/src/prefix.test.ts:170–185  ·  packages/tailwindcss/src/prefix.test.ts::loadModule
(_id, base)

Source from the content-addressed store, hash-verified

168 `,
169 {
170 async loadModule(_id, base) {
171 return {
172 path: class="st">'',
173 base,
174 module: plugin(({ addUtilities, theme }) => {
175 addUtilities({
176 class="st">'.my-custom': {
177 color: theme(class="st">'--color-red'),
178 },
179 })
180
181 class="cm">// The theme function does not use the prefix
182 expect(theme(class="st">'--tw-color-red')).toEqual(undefined)
183 }),
184 }
185 },
186 },
187 ),
188 ).toMatchInlineSnapshot(`

Callers

nothing calls this directly

Calls 2

addUtilitiesFunction · 0.85
themeFunction · 0.85

Tested by

no test coverage detected