typewritingclass-babel
v0.2.4
Published
Babel plugin for static CSS extraction with typewritingclass
Maintainers
Readme
typewritingclass-babel
Babel plugin for Typewriting Class static CSS extraction. Use this for Babel-based build systems where the Vite plugin isn't applicable.
Installation
bun add -d typewritingclass-babelRequires @babel/core 7.x as a peer dependency.
Configuration
// babel.config.json
{
"plugins": [
["typewritingclass-babel", {
"outputFile": "twc.css",
"strict": true
}]
]
}Options
| Option | Type | Default | Description |
|---|---|---|---|
| outputFile | string | "twc.css" | Path for the generated CSS file |
| strict | boolean | true | Error on dynamic values not wrapped with dynamic() |
How it works
The plugin uses Babel's visitor pattern to transform each file through the native Rust compiler, collecting extracted CSS rules and writing the combined output to the configured file.
