{"library":"pilet-webpack-plugin","title":"Pilet Webpack Plugin","description":"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.","language":"javascript","status":"active","last_verified":"Fri May 01","install":{"commands":["npm install pilet-webpack-plugin"],"cli":null},"imports":["import { PiletWebpackPlugin } from 'pilet-webpack-plugin'","const { PiletWebpackPlugin } = require('pilet-webpack-plugin')","import type { PiletWebpackPluginOptions } from 'pilet-webpack-plugin'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const { PiletWebpackPlugin } = require('pilet-webpack-plugin');\nconst piletPkg = require('./package.json');\n\nmodule.exports = {\n  plugins: [\n    new PiletWebpackPlugin({\n      name: piletPkg.name,\n      version: piletPkg.version,\n      piral: piletPkg.piral.name,\n      variables: {\n        PIRAL_CLI_VERSION: require('piral-cli/package.json').version,\n      },\n    }),\n  ],\n};","lang":"javascript","description":"Shows how to add the PiletWebpackPlugin to a webpack 4 config with required options 'name', 'version', 'piral' and optional 'variables'.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}