piral-cli-webpack5
Version:
Provides debug and build capabilities for pilets and Piral instances using Webpack v5.
43 lines (42 loc) • 1.13 kB
TypeScript
import type { SharedDependency } from 'piral-cli';
import { Configuration } from 'webpack';
export interface PiletWebpackConfigEnhancerOptions {
/**
* The name of the pilet.
*/
name: string;
/**
* The name of the entry module.
*/
entry: string;
/**
* The version of the pilet.
*/
version: string;
/**
* The name of the Piral instances.
*/
piralInstances: Array<string>;
/**
* The name of the main output file.
*/
filename: string;
/**
* The schema version. By default, v1 is used.
*/
schema?: 'v0' | 'v1' | 'v2' | 'v3' | 'mf' | 'none';
/**
* The shared dependencies. By default, these are read from the
* Piral instance.
*/
externals?: Array<string>;
/**
* Additional environment variables to define.
*/
variables?: Record<string, string>;
/**
* The shared dependencies to consider.
*/
importmap: Array<SharedDependency>;
}
export declare const piletWebpackConfigEnhancer: (details: PiletWebpackConfigEnhancerOptions) => (compiler: Configuration) => Configuration;