npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@functionalcss/next

v0.1.3

Published

FCSS Next.js plugin — source scanning, production purge via withFcss()

Readme

@functionalcss/next

Official Next.js integration for FCSS — wraps your Next.js config with withFcss() to enable production CSS purging without hydration mismatches.

Installation

pnpm add @functionalcss/core @functionalcss/next

App Router

next.config.ts (Next.js 14, 15 and 16):

import { withFcss } from '@functionalcss/next';
import type { NextConfig } from 'next';

const nextConfig: NextConfig = {};
export default withFcss(nextConfig);

app/layout.tsx:

import '@functionalcss/core/full.css';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  );
}

Pages Router

pages/_app.tsx:

import '@functionalcss/core/full.css';
import type { AppProps } from 'next/app';

export default function App({ Component, pageProps }: AppProps) {
  return <Component {...pageProps} />;
}

Next.js 16: build with webpack

Next.js 16 builds with Turbopack by default. FCSS purges through webpack's asset pipeline, so build with the --webpack flag:

{
  "scripts": {
    "dev": "next dev",
    "build": "next build --webpack"
  }
}

next dev works as usual (Turbopack or webpack). A Turbopack production build stops with a clear error instead of shipping the full, unpurged stylesheet. Next.js 14 and 15 build with webpack already and need no flag.

Configuration

Create fcss.config.ts in your project root to customise scanning paths:

import type { FcssNextConfig } from '@functionalcss/next';

const config: FcssNextConfig = {
  content: ['app/**/*.{ts,tsx}', 'components/**/*.{ts,tsx}', '!node_modules/**'],
};

export default config;

Default content paths (used when no config file is found):

  • app/**/*.{js,jsx,ts,tsx}
  • pages/**/*.{js,jsx,ts,tsx}
  • components/**/*.{js,jsx,ts,tsx}
  • src/**/*.{js,jsx,ts,tsx}

Monorepo scanning

To scan components from a shared package in your monorepo, add the package path to content:

const config: FcssNextConfig = {
  content: ['app/**/*.{ts,tsx}', '../../packages/ui/src/**/*.{ts,tsx}', '!node_modules/**'],
};

CSS Modules

FCSS global utilities and CSS Modules coexist without conflict. Import @functionalcss/core/full.css once globally and use CSS Modules normally for component-scoped styles.

Notes

  • withFcss() does not add 'use client' directives — FCSS classes are plain strings and work in Server Components without special handling.
  • Production purging is CSS-only; no runtime JavaScript is added to the browser bundle.
  • SSR and static generation are unaffected.