Webpack plugin for generating a valid pilet bundle as part of the Piral ecosystem. Current stable version 1.2.0 (released 2024) requires Node >=16 and webpack 4.x (peer dep). This plugin is the standard way to bundle pilets with Webpack v4. Unlike generic webpack configs, it sets up the specific output format, externals, and variable injection needed for pilets to work with a Piral shell. Ships TypeScript types. Part of the piral-cli toolchain; single repository was split from piral-cli-webpack. Older v0.x versions work with piral-core 0.15.
npm install pilet-webpack-pluginNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to add the PiletWebpackPlugin to a webpack 4 config with required options 'name', 'version', 'piral' and optional 'variables'.
Use pilet-webpack-plugin only with webpack 4. For webpack 5, use piral-cli-webpack5 or piral-cli-vite.
Set piral: piletPkg.piral.name from your pilet's package.json, which references the Piral shell name.
Use the 'variables' option to inject additional defines; avoid duplicates.
Update to pilet-webpack-plugin@1 and adjust options (name, version, piral).
Add piral: 'your-piral-instance-name' to the plugin options.
Downgrade to webpack@4 or use a different bundler plugin like piral-cli-webpack5.
Add 'piral-core' as a dependency in your pilet's package.json with the correct version.