{"library":"r18css","title":"esbuild-plugin-react18-css","description":"An ESBuild plugin for handling CSS and SCSS modules with autoprefixer, BEM-like scoped class names, and full tree-shaking support. Version 0.0.4 is the latest, with active development and frequent releases. Key differentiators: integrates seamlessly with ESBuild and tsup, provides full TypeScript support, offers customizable scoped class name generation, and enables fully tree-shakable CSS for React 18 libraries. It supports CSS modules, SCSS modules, and PostCSS autoprefixer out of the box.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install r18css"],"cli":null},"imports":["import cssPlugin from 'esbuild-plugin-react18-css'","import type { CSSPluginOptions } from 'esbuild-plugin-react18-css'","import cssPlugin from 'esbuild-plugin-react18-css'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import cssPlugin from 'esbuild-plugin-react18-css';\nimport esbuild from 'esbuild';\n\nawait esbuild.build({\n  entryPoints: ['src/index.tsx'],\n  bundle: true,\n  outfile: 'dist/bundle.js',\n  plugins: [cssPlugin({\n    generateScopedName: '[name]__[local]___[hash:base64:5]',\n    skipAutoPrefixer: false,\n    globalPrefix: 'myapp',\n  })],\n});\n\n// With tsup:\n// tsup.config.ts\nimport { defineConfig } from 'tsup';\nexport default defineConfig({\n  esbuildPlugins: [cssPlugin()],\n});","lang":"typescript","description":"Shows how to use the plugin with ESBuild and tsup, including options like custom scoped name and global prefix.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}