@harmony-css/next-plugin
v0.1.2
Published
Next.js plugin for harmony-css
Maintainers
Readme
@harmony-css/next-plugin
Next.js integration for harmony-css, a zero-runtime CSS-in-JS library.
Features
- Seamless integration with Next.js
- Support for both App Router and Pages Router
- Optimized CSS extraction and loading
- Development mode debugging tools
- Production mode optimizations
Installation
npm install --save @harmony-css/next-plugin
# or
yarn add @harmony-css/next-pluginUsage
Add the plugin to your Next.js configuration:
// next.config.js
const { harmonyCssPlugin } = require('@harmony-css/next-plugin');
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
swcPlugins: [
['harmony-css-swc-plugin', {
mode: process.env.NODE_ENV === 'development'
? 'development'
: 'production',
// Other plugin options
}]
]
}
};
module.exports = harmonyCssPlugin(nextConfig);License
MIT
