@amisa/style-plugin
v2.1.14
Published
Transfom css's file to java scripts style element and js to script element
Downloads
25
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]