@veryfront/ext-css-tailwind
v0.1.1072
Published
Veryfront first-party extension package for ext-css-tailwind
Maintainers
Readme
@veryfront/ext-css-tailwind
Category: Build | Contract:
CSSProcessor| Built-in
Provides Tailwind CSS v4 compilation for Veryfront. Compiles stylesheets at render time and supports dynamic plugin loading from CDN.
Registration
This extension is auto-enabled by core bootstrap. Add it to veryfront.config.ts only when you need to override the built-in registration:
import extTailwind from "@veryfront/ext-css-tailwind";
export default defineConfig({
extensions: [extTailwind()],
});Provided contract
CSSProcessor — exposes:
compile(stylesheet, options)— delegates to Tailwind's nativecompile()and returns a compiler whosebuild(candidates)emits CSS for the class-name candidates discovered at render time.
Plugin shims
On setup the extension installs three globalThis shims so that Tailwind plugin bundles loaded at runtime from esm.sh bind their tailwindcss/plugin, tailwindcss/defaultTheme, and tailwindcss/colors imports to the same tailwindcss copy this extension ships. Core's plugin-loader.ts rewrites plugin bundle code to reference these shims by name; without them, dynamic plugin loading fails.
The shims live at:
globalThis.__tailwindPluginShimglobalThis.__tailwindDefaultThemeShimglobalThis.__tailwindColorsShim
Capabilities
- net
esm.sh: loading user-declared Tailwind plugins from CDN at runtime.
Configuration
No factory options. The extension reads no environment variables and takes no config.
