Options
All
  • Public
  • Public/Protected
  • All
Menu

Options affecting the output of the compilation. output options tell webpack how to write the compiled files to disk.

Hierarchy

  • Output

Index

Properties

amdContainer?: string

Add a container for define/require functions in the AMD module.

assetModuleFilename?: string | ((pathData: "/home/runner/work/forge/forge/node_modules/webpack/types".PathData, assetInfo?: AssetInfo) => string)

The filename of asset modules as relative path inside the 'output.path' directory.

asyncChunks?: boolean

Enable/disable creating async chunks that are loaded on demand.

auxiliaryComment?: string | LibraryCustomUmdCommentObject

Add a comment in the UMD wrapper.

charset?: boolean

Add charset attribute for script tag.

chunkFilename?: string | ((pathData: "/home/runner/work/forge/forge/node_modules/webpack/types".PathData, assetInfo?: AssetInfo) => string)

Specifies the filename template of output files of non-initial chunks on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.

chunkFormat?: string | false

The format of chunks (formats included by default are 'array-push' (web/WebWorker), 'commonjs' (node.js), 'module' (ESM), but others might be added by plugins).

chunkLoadTimeout?: number

Number of milliseconds before chunk request expires.

chunkLoading?: string | false

The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).

chunkLoadingGlobal?: string

The global variable used by webpack for loading of chunks.

clean?: boolean | CleanOptions

Clean the output directory before emit.

compareBeforeEmit?: boolean

Check if to be emitted file already exists and have the same content before writing to output filesystem.

crossOriginLoading?: false | "anonymous" | "use-credentials"

This option enables cross-origin loading of chunks.

cssChunkFilename?: string | ((pathData: "/home/runner/work/forge/forge/node_modules/webpack/types".PathData, assetInfo?: AssetInfo) => string)

Specifies the filename template of non-initial output css files on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.

cssFilename?: string | ((pathData: "/home/runner/work/forge/forge/node_modules/webpack/types".PathData, assetInfo?: AssetInfo) => string)

Specifies the filename template of output css files on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.

devtoolFallbackModuleFilenameTemplate?: string | Function

Similar to output.devtoolModuleFilenameTemplate, but used in the case of duplicate module identifiers.

devtoolModuleFilenameTemplate?: string | Function

Filename template string of function for the sources array in a generated SourceMap.

devtoolNamespace?: string

Module namespace to use when interpolating filename template string for the sources array in a generated SourceMap. Defaults to output.library if not set. It's useful for avoiding runtime collisions in sourcemaps from multiple webpack projects built as libraries.

enabledChunkLoadingTypes?: string[]

List of chunk loading types enabled for use by entry points.

enabledLibraryTypes?: string[]

List of library types enabled for use by entry points.

enabledWasmLoadingTypes?: string[]

List of wasm loading types enabled for use by entry points.

environment?: Environment

The abilities of the environment where the webpack generated code should run.

filename?: string | ((pathData: "/home/runner/work/forge/forge/node_modules/webpack/types".PathData, assetInfo?: AssetInfo) => string)

Specifies the filename of output files on disk. You must not specify an absolute path here, but the path may contain folders separated by '/'! The specified path is joined with the value of the 'output.path' option to determine the location on disk.

globalObject?: string

An expression which is used to address the global object/scope in runtime code.

hashDigest?: string

Digest type used for the hash.

hashDigestLength?: number

Number of chars which are used for the hash.

hashFunction?: string | typeof Hash

Algorithm used for generation the hash (see node.js crypto package).

hashSalt?: string

Any string which is added to the hash to salt it.

hotUpdateChunkFilename?: string

The filename of the Hot Update Chunks. They are inside the output.path directory.

hotUpdateGlobal?: string

The global variable used by webpack for loading of hot update chunks.

hotUpdateMainFilename?: string

The filename of the Hot Update Main File. It is inside the 'output.path' directory.

ignoreBrowserWarnings?: boolean

Ignore warnings in the browser.

iife?: boolean

Wrap javascript code into IIFE's to avoid leaking into global scope.

importFunctionName?: string

The name of the native import() function (can be exchanged for a polyfill).

importMetaName?: string

The name of the native import.meta object (can be exchanged for a polyfill).

Make the output files a library, exporting the exports of the entry point.

libraryExport?: string | string[]

Specify which export should be exposed as library.

libraryTarget?: string

Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).

module?: boolean

Output javascript files as module source type.

path?: string

The output directory as absolute path (required).

pathinfo?: boolean | "verbose"

Include comments with information about the modules.

publicPath?: string | ((pathData: "/home/runner/work/forge/forge/node_modules/webpack/types".PathData, assetInfo?: AssetInfo) => string)

The 'publicPath' specifies the public URL address of the output files when referenced in a browser.

scriptType?: false | "module" | "text/javascript"

This option enables loading async chunks via a custom script type, such as script type="module".

sourceMapFilename?: string

The filename of the SourceMaps for the JavaScript files. They are inside the 'output.path' directory.

sourcePrefix?: string

Prefixes every line of the source in the bundle with this string.

strictModuleErrorHandling?: boolean

Handles error in module loading correctly at a performance cost. This will handle module error compatible with the EcmaScript Modules spec.

strictModuleExceptionHandling?: boolean

Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.

trustedTypes?: string | true | TrustedTypes

Use a Trusted Types policy to create urls for chunks. 'output.uniqueName' is used a default policy name. Passing a string sets a custom policy name.

umdNamedDefine?: boolean

If output.libraryTarget is set to umd and output.library is set, setting this to true will name the AMD module.

uniqueName?: string

A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.

wasmLoading?: string | false

The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).

webassemblyModuleFilename?: string

The filename of WebAssembly modules as relative path inside the 'output.path' directory.

workerChunkLoading?: string | false

The method of loading chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (WebWorker), 'require' (sync node.js), 'async-node' (async node.js), but others might be added by plugins).

workerPublicPath?: string

Worker public path. Much like the public path, this sets the location where the worker script file is intended to be found. If not set, webpack will use the publicPath. Don't set this option unless your worker scripts are located at a different path from your other script files.

workerWasmLoading?: string | false

The method of loading WebAssembly Modules (methods included by default are 'fetch' (web/WebWorker), 'async-node' (node.js), but others might be added by plugins).