| | |
| | | const ExternalsPlugin = require("../ExternalsPlugin"); |
| | | |
| | | /** @typedef {import("../Compiler")} Compiler */ |
| | | /** @typedef {"main" | "preload" | "renderer"} ElectronContext */ |
| | | |
| | | class ElectronTargetPlugin { |
| | | /** |
| | | * @param {"main" | "preload" | "renderer"=} context in main, preload or renderer context? |
| | | * Creates an instance of ElectronTargetPlugin. |
| | | * @param {ElectronContext=} context in main, preload or renderer context? |
| | | */ |
| | | constructor(context) { |
| | | /** @type {ElectronContext | undefined} */ |
| | | this._context = context; |
| | | } |
| | | |
| | | /** |
| | | * Apply the plugin |
| | | * Applies the plugin by registering its hooks on the compiler. |
| | | * @param {Compiler} compiler the compiler instance |
| | | * @returns {void} |
| | | */ |