TailwindCssRuntimeOptions
Tailwind CSS runtime root configuration.
Propertiesβ
projectRoot?β
Optional | projectRoot:
string
The project root directory used when parsing Tailwind resources. The default is process.cwd().
tailwindcss?β
Optional | tailwindcss:
TailwindCssOptions
Tailwind runtime configuration.
config?β
Optional | config:
string
Tailwind configuration file path. It can be passed in explicitly when automatic recognition is not accurate enough.
cwd?β
Optional | cwd:
string
The working directory used when resolving relative paths in the Tailwind configuration.
postcssPlugin?β
Optional | postcssPlugin:
string
Custom PostCSS plugin name. If not passed in, the default name is used.
version?β
Optional | version:
4
The major version of Tailwind CSS used by the current project. If not passed it will be inferred from the installed package.
packageName?β
Optional | packageName:
string
Tailwind package name. This can be changed when the project uses branch packages.
resolve?β
Optional | resolve:
PackageResolvingOptions
Packet parsing configuration passed to local-pkg.
v4?β
Optional | v4:
TailwindV4Options
Tailwind CSS v4 extraction and CSS entry options.
apply?β
Optional | apply:
ApplyOptions
Runtime behavior switch.
overwrite?β
Optional | overwrite:
boolean
Whether to allow overwriting existing runtime cache or context state.
exposeContext?β
Optional | exposeContext:
boolean | ExposeContextOptions
Whether to expose the runtime Tailwind context, or configure the specific exposure method.
extendLengthUnits?β
Optional | extendLengthUnits:
false | ExtendLengthUnitsOptions
Extended length unit support, passing false can be turned off completely.
extract?β
Optional | extract:
ExtractOptions
Class name extraction result output configuration.
write?β
Optional | write:
boolean
Whether to write the extraction result file.
file?β
Optional | file:
string
Output file path, which can be passed as an absolute path or a relative path.
format?β
Optional | format:
"json" | "lines"
Output format. Use JSON when not passed in.
pretty?β
Optional | pretty:
number | boolean
JSON formatting indentation. Passing a true value enables indentation.
removeUniversalSelector?β
Optional | removeUniversalSelector:
boolean
Whether to remove the wildcard selector * from the final list.
filter()?β
Optional | filter():
(className: string) => boolean
Function to filter the final class name.
Parametersβ
classNameβ
string
returnβ
boolean
cache?β
Optional | cache:
boolean | CacheOptions
Cache configuration. Pass in a boolean value to quickly enable or disable it.