0.5.1 • Published 21 days ago
@htmelt/plugin v0.5.1
@htmelt/unocss
How It Works
- It loads your
unocss.config.js
file. - It scans your JSX and TSX files for tokens identified by UnoCSS plugins/presets.
- For each JSX and TSX module, it generates a separate CSS file and adds it to the document with JavaScript.
Roadmap
- Use lightningcss to remove duplicate CSS rules on a per-chunk basis.
Install
pnpm install -D @htmelt/unocss
yarn add -D @htmelt/unocss
npm install --save-dev @htmelt/unocss
import.meta
extensions
The typings of import.meta
and import.meta.env
can both be extended
by plugins.
declare module '@htmelt/plugin/dist/importMeta.mjs' {
export interface ImportMeta {
foo: string
}
export interface ImportMetaEnv {
bar: string
}
}
// Important: Ensure this file is a module
export {}
It's recommended to add a client.d.ts
module to your plugin's root
directory and advise users to include my-plugin/client
in the types
array of their tsconfig (along with htmelt/client
).
{
"compilerOptions": {
"types": ["htmelt/client", "my-plugin/client"]
}
}
0.5.1
21 days ago
0.4.0
3 months ago
0.3.0
1 year ago
0.2.7
1 year ago
0.2.8
1 year ago
0.3.2
12 months ago
0.3.1
12 months ago
0.3.4
11 months ago
0.3.3
11 months ago
0.2.6
1 year ago
0.2.5
1 year ago
0.2.4
1 year ago
0.2.3
1 year ago
0.2.2
1 year ago
0.2.1
1 year ago
0.2.0
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.1.0
1 year ago