webpack: add electron-preload to valid config targets (#42671)

Added in 4.33.0 (https://github.com/webpack/webpack/releases/tag/v4.33.0).

See also:
* https://github.com/webpack/webpack/pull/9188
* https://v4.webpack.js.org/configuration/target/#target
This commit is contained in:
Mark Lee
2020-02-27 11:14:35 -08:00
committed by GitHub
parent eb7c8b9178
commit 91c76accda

View File

@@ -100,11 +100,13 @@ declare namespace webpack {
* - "atom" Compile for usage in electron (formerly known as atom-shell), supports require for modules necessary to run Electron.
* - "electron-renderer" Compile for Electron for renderer process, providing a target using JsonpTemplatePlugin, FunctionModulePlugin for browser
* environments and NodeTargetPlugin and ExternalsPlugin for CommonJS and Electron built-in modules.
* - "electron-preload" Compile for Electron for renderer process, providing a target using NodeTemplatePlugin with asyncChunkLoading set to true,
* FunctionModulePlugin for browser environments and NodeTargetPlugin and ExternalsPlugin for CommonJS and Electron built-in modules.
* - "electron-main" Compile for Electron for main process.
* - "atom" Alias for electron-main.
* - "electron" Alias for electron-main.
*/
target?: 'web' | 'webworker' | 'node' | 'async-node' | 'node-webkit' | 'atom' | 'electron' | 'electron-renderer' | 'electron-main' | ((compiler?: any) => void);
target?: 'web' | 'webworker' | 'node' | 'async-node' | 'node-webkit' | 'atom' | 'electron' | 'electron-renderer' | 'electron-preload' | 'electron-main' | ((compiler?: any) => void);
/** Report the first error as a hard error instead of tolerating it. */
bail?: boolean;
/** Capture timing information for each module. */