import * as webpack from 'webpack'; import { type IPackageJson } from '@rushstack/node-core-library'; import type { ITerminal } from '@rushstack/terminal'; import type { IWebpackConfigurationWithDevServer } from '@rushstack/heft-webpack5-plugin/lib/index'; import type { IModuleMinifier } from '@rushstack/module-minifier'; import type { _IManifestsFileMetadata as IManifestsFileMetadata } from '@msinternal/spfx-manifests-file'; import type { GenerateCssClassNameFunction } from '@microsoft/sp-css-loader'; import type { IClientSideComponentManifest, _IOperatorOrSwitch } from '@microsoft/sp-module-interfaces'; import type { IConfigJson } from '../../spfxConfig/interfaces/config-v2'; import type { ILocalization } from './ILocalization'; /** * @public */ export interface ISpfxWebpackFolderPaths { buildFolder: string; tempFolder: string; outputFolder: string; releaseFolder: string; } /** * @internal */ export interface IFlightedDependencyEntry { /** The version which should be used when the condition resolves to FALSE. */ activeVersion: string; /** The version which should be used when the condition resolves to TRUE. */ fallbackVersion: string; /** The condition controlling if we are using the active (false) or fallback (true) version. */ condition: _IOperatorOrSwitch; } /** * @internal */ export interface IFlightedDependencyConfig { /** A GUID to entry mapping, where the GUID should be the manifest of the multiversion bundle that is being flighted. */ [id: string]: IFlightedDependencyEntry; } /** * @public */ export interface IWebpackConfigurationGeneratorOptions { configJson: IConfigJson; folders: ISpfxWebpackFolderPaths; terminal: ITerminal; emitStats?: boolean; production: boolean; serveMode: boolean; projectPackageJson: IPackageJson; /** * @alpha */ getLocalization?: () => ILocalization; selectedLocales?: ReadonlyArray; linkedExternalsToBundle?: string[]; disableAsyncComponentLoading?: boolean; assetsAreVersioned?: boolean; generateCssClassName?: GenerateCssClassNameFunction; loadThemedStylesImportPath?: string; releaseManifestFolderName?: string; crossOriginLoading?: boolean; buildSourceMaps?: boolean; releaseMapFiles?: boolean; sourceMapUrlFilter?: (url: string, resourcePath: string) => boolean | string; /** * @internal */ _manifestsJsFileMetadata?: IManifestsFileMetadata; /** * @internal */ _includeIntegrityInManifestPaths?: boolean; /** * @internal */ _useManifestsJsonForComponentDependencies?: boolean; /** * @internal */ _moduleMinifier?: IModuleMinifier; /** * @internal */ _flightedDependencyConfig?: IFlightedDependencyConfig; } /** * @public */ export declare const FILE_LOADER_EXTENSIONS: string[]; /** * @public */ export declare const IS_SPFX_WEBPACK_CONFIGURATION_SYMBOL: unique symbol; /** * @public */ export declare const CONFIG_JSON_SYMBOL: unique symbol; /** * @public */ export interface ISpfxWebpackConfiguration extends IWebpackConfigurationWithDevServer { [IS_SPFX_WEBPACK_CONFIGURATION_SYMBOL]: true; [CONFIG_JSON_SYMBOL]: IConfigJson; } /** * @internal */ export declare const FILE_LOADER_RULE_TEST: webpack.RuleSetCondition; /** * @internal */ export declare const COMMON_RULE_OPTIONS: Partial; /** * @public */ export declare class WebpackConfigurationGenerator { static generateWebpackConfigurationAsync(options: IWebpackConfigurationGeneratorOptions): Promise; /** * @internal */ static getComponentBundleId(manifest: IClientSideComponentManifest): string; /** * Writes the entrypoint file to the temp directory and returns the path to the file. */ private static _generateBundleEntrypointFileAsync; private static _requireResolveWithCorrectCase; private static _validateEntries; } //# sourceMappingURL=WebpackConfigurationGenerator.d.ts.map