Resolve helper functions in CSS previews (#766)
parent
2ddb1f93f8
commit
8266d6b0aa
|
@ -767,6 +767,13 @@ async function createProjectService(
|
|||
.default
|
||||
),
|
||||
},
|
||||
evaluateTailwindFunctions: {
|
||||
module: firstOptional(
|
||||
() =>
|
||||
require(resolveFrom(configDir, 'tailwindcss/lib/lib/evaluateTailwindFunctions'))
|
||||
.default
|
||||
),
|
||||
},
|
||||
}
|
||||
} catch (_) {
|
||||
try {
|
||||
|
|
|
@ -18,6 +18,7 @@ export function generateRules(
|
|||
|
||||
let root = state.modules.postcss.module.root({ nodes: rules.map(([, rule]) => rule) })
|
||||
state.modules.jit.expandApplyAtRules.module(state.jitContext)(root)
|
||||
state.modules.jit.evaluateTailwindFunctions?.module?.(state.jitContext)(root)
|
||||
|
||||
let actualRules: Rule[] = []
|
||||
root.walkRules((subRule) => {
|
||||
|
|
|
@ -110,6 +110,7 @@ export interface State {
|
|||
generateRules: { module: any }
|
||||
createContext: { module: any }
|
||||
expandApplyAtRules: { module: any }
|
||||
evaluateTailwindFunctions?: { module: any }
|
||||
}
|
||||
}
|
||||
browserslist?: string[]
|
||||
|
|
Loading…
Reference in New Issue