Skip to content

Commit 2af1ec1

Browse files
anshumanvmontogeek
authored andcommitted
docs(configuration) Added note about having configuration with multiple promises (#2960)
* enh: config with multiple promises * Add contributor * Update src/content/configuration/configuration-types.md Co-Authored-By: anshumanv <[email protected]> * update * update * Update src/content/configuration/configuration-types.md Co-Authored-By: anshumanv <[email protected]>
1 parent abcdded commit 2af1ec1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/content/configuration/configuration-types.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ contributors:
1010
- byzyk
1111
- EugeneHlushko
1212
- dhurlburtusa
13+
- anshumanv
1314
---
1415

1516
Besides exporting a single config object, there are a few more ways that cover other needs as well.
@@ -46,6 +47,8 @@ One option is to export a function from your webpack config instead of exporting
4647

4748
webpack will run the function exported by the configuration file and wait for a Promise to be returned. Handy when you need to asynchronously load configuration variables.
4849

50+
T> It is possible to export multiple promises by wrapping them into `Promise.all([/* Your promises */]).`
51+
4952
```js
5053
module.exports = () => {
5154
return new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)