1.0.1 • Published 1 year ago

fabric-fastify-podlet-plugin v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Fabric Fasitfy Podlet Plugin

This plugin is intended for use with @podium/experimental-fastify-podlet-server This hooks into Esbuild and replaces @fabric-css placeholders in content or fallback files with inlined, purged fabric CSS.

How to use

Install

npm install fabric-fastify-podlet-plugin

Import

// build.js
import fabricPlugin from 'fabric-fastify-podlet-plugin'

Register

// build.js
import fabricPlugin from 'fabric-fastify-podlet-plugin';
export default () => [fabricPlugin()];

Add placeholder

// content.js
import { html, css } from "lit";
import { PodiumPodletElement } from "@podium/experimental-lit-base-class";

export default class Content extends PodiumPodletElement {
    static styles = css`
        @fabric-css
    `;
    render() { ... }
}