Skip to main content

Peer dependencies

Style Dictionary and your bundler are peers, so you choose their versions.
Style Dictionary is the one peer that is not optional. An older major is refused when you install, with npm’s ERESOLVE, rather than failing later in the build.
The Rspack peer is @rspack/core. The npm package named rspack is unrelated.

Node

The plugin needs Node 22.12 or newer. unplugin declares ^20.19.0 || >=22.12.0, and every Style Dictionary 5 release declares >=22.0.0. Only 22.12 and newer satisfies both. One configuration format asks for more: a .ts configuration file needs Node 22.18 or newer, where TypeScript type stripping is on by default. Nothing warns about that when you install. See Configuration.

TypeScript

The subpath entry points need a moduleResolution of bundler, node16 or nodenext. The deprecated node10 cannot resolve them. The package is written in TypeScript and ships its own declarations, so there is nothing else to install.

Next

Add it to your bundler

Import the entry point that matches your bundler.