Skip to content

Commit cdbfd75

Browse files
MartinMuzatkoulivz
authored andcommittedOct 11, 2019
feat($core): support async function exported in vuepress config (close: #1185) (#1925)
1 parent 1f3e4e2 commit cdbfd75

File tree

1 file changed

+4
-4
lines changed
  • packages/@vuepress/core/lib/node

1 file changed

+4
-4
lines changed
 

‎packages/@vuepress/core/lib/node/App.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ module.exports = class App {
5656
/**
5757
* Resolve user config and initialize.
5858
*
59-
* @returns {void}
59+
* @returns {Promise<void>}
6060
* @api private
6161
*/
6262

63-
resolveConfigAndInitialize () {
63+
async resolveConfigAndInitialize () {
6464
if (this.options.siteConfig) {
6565
this.siteConfig = this.options.siteConfig
6666
} else {
6767
let siteConfig = loadConfig(this.vuepressDir)
6868
if (isFunction(siteConfig)) {
69-
siteConfig = siteConfig(this)
69+
siteConfig = await siteConfig(this)
7070
}
7171
this.siteConfig = siteConfig
7272
}
@@ -95,7 +95,7 @@ module.exports = class App {
9595
*/
9696

9797
async process () {
98-
this.resolveConfigAndInitialize()
98+
await this.resolveConfigAndInitialize()
9999
this.normalizeHeadTagUrls()
100100
this.themeAPI = loadTheme(this)
101101
this.resolveTemplates()

0 commit comments

Comments
 (0)
Please sign in to comment.