The standalone unocss fresh plugin uses a conventional uno.config.ts file and presetNetzo handles theming. Note that note that NetzoConfig extends FreshConfig so we can directly pass a fresh plugins array.
// netzo.ts
import { Netzo } from "netzo/mod.ts";
import { unocss } from "netzo/plugins/unocss/plugin.ts";
export const netzo = await Netzo({
plugins: [unocss()], // auto-loads uno.config.ts
});
if (import.meta.main) netzo.start();
Closes https://github.com/netzo/netzo/issues/114. See also https://github.com/netzo/netzo/issues/85#issuecomment-1925870041.
The
components
module is to be dropped in favor of a standaloneunocss
plugin to decouple it from netzo.options
property fromUnocssOptions
unocss
to require explicituno.config.ts
file whencsr
mode enabledbundle:csr
task workaround to instead load originaluno.config.ts
from client (now that it's required whencsr
mode enabled)netzo/plugins/components
in favor ofnetzo/plugins/unocss
and netzo preset{ color: "zinc", radius: 0.5 }
fixtures-plugins-unocss
Before
The
components
module would setup an adaptedunocss
fresh plugin internally and handle theming.Now
The standalone
unocss
fresh plugin uses a conventionaluno.config.ts
file andpresetNetzo
handles theming. Note that note thatNetzoConfig
extendsFreshConfig
so we can directly pass a freshplugins
array.