A Rollup plugin for loading CSS files with Hot Module Replacement (HMR) support via Nollup. Version 0.7.2 is the latest release. It supports preprocessing with built-in scss and less loaders or custom loaders (including PostCSS), resolves asset URLs (images, fonts), and emits them as Rollup assets. HMR works by replacing the <link> tag href with a timestamp to force browser reload. Differentiates from other CSS plugins by focusing on HMR with Nollup and flexible loader chaining.
npm install rollup-plugin-hot-cssVerified import paths — ran on the pinned version, not inferred.
Basic Rollup config using rollup-plugin-hot-css with SCSS preprocessing and HMR.
Set hot: false for production builds, or use Nollup development server.
Ensure each loader (especially custom ones) returns a sourcemap or disable url: false.
Set assetFileNames to '[name][extname]' to get expected output filename.
Always return a Promise object, not an object directly from the executor. Use async/await or new Promise(resolve => resolve({...})).For custom loaders, use a function that receives (input, id) and returns { code, map?, watchFiles? }.npm install sass --save-dev
Add '.css' to extensions and ensure a loader is present (e.g., loaders: [] for plain CSS).
Use require() or configuration with bundler that handles CJS interop.
Ensure you are using Nollup dev server. For Rollup-only builds, set hot: false.
No dependency data recorded yet.