mirror of
https://github.com/scratchfoundation/scratch-webpack-configuration.git
synced 2024-11-27 10:05:37 -05:00
feat: add method for defining additional externals
This commit is contained in:
parent
348a60a074
commit
56c3806611
1 changed files with 10 additions and 0 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue