mirror of
https://github.com/scratchfoundation/scratch-webpack-configuration.git
synced 2025-08-06 11:09:14 -04: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;
|
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.
|
* Set the target environment for this configuration.
|
||||||
* @param {string} target The target environment, like `node`, `browserslist`, etc.
|
* @param {string} target The target environment, like `node`, `browserslist`, etc.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue