gerhardsletten / preact-cli-goober-ssr

Extract goober styles on ssr build

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preact cli Goober SSR

Preact CLI plugin to run Goobers extractCss method on prerendered pages.

Usage

npm i preact-cli-goober-ssr -D

# preact.config.js
const gooberPlugin = require('preact-cli-goober-ssr')

export default (config, env) => {
  gooberPlugin(config, env)
}

This will when you build your preact-app (npm run build) insert extracted styles from your goober-components for your pre rendered pages:

<style id="_goober">.go2557742045{color: red;}</style>

About

Extract goober styles on ssr build


Languages

Language:JavaScript 100.0%