css-preprocess
v1.1.5
Published
Advanced CSS preprocessing engine for TypeScript/Next.js projects
Maintainers
Readme
css-preprocess
Advanced CSS preprocessing engine for TypeScript/Next.js projects with optimized build management.
Installation
npm install css-preprocessQuick Start
TypeScript
import { CSSProcessor } from 'css-preprocess';
const processor = new CSSProcessor({
configKey: process.env.CSS_PROCESSOR_KEY || '',
debug: 0,
});
processor.start().catch(console.error);Next.js
Create instrumentation.ts in your project root:
import { CSSProcessor } from 'css-preprocess';
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
const processor = new CSSProcessor({
configKey: process.env.CSS_PROCESSOR_KEY || '',
});
await processor.start();
}
}Enable in next.config.js:
module.exports = {
experimental: {
instrumentationHook: true,
},
}Requirements
- Node.js >= 18.0.0
- TypeScript >= 5.0.0 (for TypeScript projects)
