feat: add method for defining additional externals

This commit is contained in:
Georgi Angelov 2024-09-16 11:35:49 +03:00
parent 348a60a074
commit 56c3806611

View file

@ -246,6 +246,16 @@ class ScratchWebpackConfigBuilder {
return this;
}
/**
* Append new externals to the current configuration object.
* @param {string[]} externals Externals to add.
* @returns {this}
*/
addExternals(externals) {
this._config = this._config.externals.concat(externals);
return this;
}
/**
* Set the target environment for this configuration.
* @param {string} target The target environment, like `node`, `browserslist`, etc.