Webpack loader for compiling Riot.js tag files (.tag). The official loader maintained by the Riot team. Current stable version is v9.0.1, with v10.0.0 in alpha requiring Riot v10 and Node >=22. Handles parsing of Riot tags into JavaScript modules, supports hot module replacement via riot-hot-reload, and offers sourcemap configuration. Key differentiator: tightly coupled with riot-compiler, supports webpack 5, ESM-first from v9. Breaking changes: dropped webpack <=4 and Node <18 in v9, migrated from CJS to ESM. Release cadence: major version bumps with Riot compiler releases.
npm install riot-tag-loaderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows a minimal webpack 5 configuration using riot-tag-loader with ESM syntax, targeting .tag files.
Upgrade Node to version 22 or later.
Upgrade webpack to version 5.
Use import syntax or dynamic import. If you must use CJS, stick to v8.x.
Install riot-compiler@^6.0.0 alongside.
Set hot: false in loader options unless you have installed and imported riot-hot-reload.
Run npm install riot-compiler --save-dev.
Add a rule in webpack config: { test: /\.tag$/, use: ['riot-tag-loader'] }.Use import statement instead of require().