@nibcss/next & @nibcss/nuxt
The two meta-framework presets: withNib for Next.js and the Nuxt module, with every option and the files they generate.
Both packages exist for the same reason: a meta-framework owns its build, so the integration should own nothing else. Each one wires the bundler plugin, the runtime and the dev-server behaviour in a single line.
@nibcss/next#
// next.config.ts
import { withNib } from "@nibcss/next";
export default withNib(nextConfig, {
include: ["app/**/*.tsx", "content/**/*.md"],
exclude: ["**/*.stories.tsx"],
config: "config/nibcss.config.ts",
devtools: true,
});Option | Default | What it does |
|---|---|---|
| project sources | extra globs to scan, or skip |
| auto-detected | path to the config file |
|
| mount the overlay in dev (needs |
|
|
|
rewrite is deliberately not an option — the preset owns it: attributes are kept beside the class
in development and replaced in a build. Pass it anyway and the preset says so once.
What it generates#
Path | What it is |
|---|---|
| the stylesheet, imported as |
| the resolved config |
| a real package re-exporting it |
| the runtime entry added to the client bundle |
| dev only, |
@nibcss/nuxt#
// nuxt.config.ts
export default defineNuxtConfig({
modules: ["@nibcss/nuxt"],
nib: {
runtime: true,
devtools: true,
include: ["content/**/*.md"],
override: { debug: process.env.CI !== "true" },
},
});Option | Default | What it does |
|---|---|---|
|
| install the Vue plugin automatically |
|
| mount the overlay in dev (needs |
| beside | path to the config file |
| project sources | extra globs to scan, or skip |
| — | config fields that win over the file |
|
|
|
The module adds the stylesheet to nuxt.options.css, registers the Vue plugin on both client and
server, re-reads the config per render in dev, and — with darkMode: "class" — inlines the dark-mode
decision at the top of <head> so a dark app never flashes white.
What it generates#
Path | What it is |
|---|---|
| the stylesheet, added to |
| the resolved config |
| a real package re-exporting it |
| the generated plugins |