diff --git a/src/node/config.ts b/src/node/config.ts index 4fdc2117..c27bd758 100644 --- a/src/node/config.ts +++ b/src/node/config.ts @@ -47,6 +47,7 @@ export interface UserConfig { srcDir?: string srcExclude?: string[] + outDir?: string /** * Enable MPA / zero-JS mode @@ -94,6 +95,7 @@ export async function resolveConfig( const [userConfig, configPath] = await resolveUserConfig(root, command, mode) const site = await resolveSiteData(root, userConfig) const srcDir = path.resolve(root, userConfig.srcDir || '.') + const outDir = path.resolve(root, userConfig.outDir || resolve(root, 'dist')) // resolve theme path const userThemeDir = resolve(root, 'theme') @@ -121,7 +123,7 @@ export async function resolveConfig( themeDir, pages, configPath, - outDir: resolve(root, 'dist'), + outDir, tempDir: path.resolve(APP_PATH, 'temp'), markdown: userConfig.markdown, alias: resolveAliases(themeDir),