amisa-csstostyle-plugin
v0.0.8
Published
Transfom css's file to java scripts style element.
Downloads
12
Maintainers
Readme
transform css file to style elemenet tag
The Vite library Mode plugin, which supports single file transform (the default mode for Vite)
import { defineConfig } from 'vite';
import { AmisaCssTransformStylePlugin } from 'amisa-csstostyle-plugin';
export default defineConfig({
.
.
.
plugins: [
AmisaCssTransformStylePlugin()
],
.
.
.
})
Usage Examples
export class SomeJavaScriptClass {
public style: HTMLStyleElement
constructor() {
this.style = document.createAmisaStyleElement('Main.css')
document.appendChild(this.#style)
}
}
export class SomeJavaScriptClass {
style
constructor() {
this.style = document.createAmisaStyleElement('Main.css')
document.appendChild(this.style)
}
}
all css styles in 'Main.css' file
send me email : [email protected]