A Babel plugin for inline CSS scoping using the `k` tagged template literal from the Kremling library. Current version 2.0.0 allows omitting ampersands in scoped CSS, provides namespace customization for micro-frontends, supports PostCSS and Sass preprocessing, and offers a :global escape hatch for unscoped styles. Key differentiators are zero-runtime CSS-in-JS via Babel transform, synchronous PostCSS plugin support, and integration with kremling-loader for webpack. Release cadence is low, focused on stability. Compatible with Babel 7+.
npm install kremling-babel-pluginVerified import paths — ran on the pinned version, not inferred.
Babel configuration with plugin options, and a React component using k tagged template and useCss for scoped styles.
Set sassOptions: {} in plugin options.Use only sync PostCSS plugins or avoid asynchronous ones.
Provide a unique namespace string in plugin options.
Use ['module:kremling-babel-plugin', options] in .babelrc.
npm install --save-dev kremling-loader
Add 'sassOptions': {} to the plugin options.Change import to: import { k } from 'kremling'Check CSS for valid Sass syntax or use postcssOptions if not using Sass.