Webpack loader that generates TypeScript definition files (.d.ts) for CSS Modules, acting as a replacement for the abandoned typings-for-css-modules-loader. Current stable version is 2.0.2. It integrates with css-loader (v2-v7) and requires webpack 5+ (breaking change from v1). Key differentiators: lightweight, no style content modification, supports named exports and custom typings generation via callback. Release cadence is low; last update was 2023.
Verified import paths — ran on the pinned version, not inferred.
When namedExport is false (default), use default import. Requires a .d.ts declaration for *.scss modules.
Only valid when namedExport: true is set in loader options. css-loader must use camelCase for class names.
Works with both namedExport: true/false. With namedExport: true, the module exports both named and default (the object). With namedExport: false, the module exports a single default object (use = styles).
Configures webpack to use dts-css-modules-loader with named exports and css-loader camelCase convention. Imports individual class names in TypeScript.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.