Skip to content

Commit

Permalink
refactor: rename site alias
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 11, 2021
1 parent 69e172a commit 9c79061
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/node/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface SiteConfig<ThemeConfig = any> {
themeDir: string
outDir: string
tempDir: string
aliases: AliasOptions
alias: AliasOptions
pages: string[]
markdown?: MarkdownOptions
}
Expand Down Expand Up @@ -59,7 +59,7 @@ export async function resolveConfig(
outDir: resolve(root, 'dist'),
tempDir: path.resolve(APP_PATH, 'temp'),
markdown: userConfig.markdown,
aliases: resolveAliases(root, themeDir, userConfig)
alias: resolveAliases(root, themeDir, userConfig)
}

return config
Expand Down
4 changes: 2 additions & 2 deletions src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const isPageChunk = (

export function createVitePressPlugin(
root: string,
{ configPath, aliases, markdown, themeDir, site }: SiteConfig,
{ configPath, alias, markdown, site }: SiteConfig,
ssr = false,
pageToHashMap?: Record<string, string>
): Plugin[] {
Expand All @@ -42,7 +42,7 @@ export function createVitePressPlugin(

config() {
return {
alias: aliases,
alias,
define: {
__CARBON__: !!site.themeConfig.carbonAds?.carbon,
__BSA__: !!site.themeConfig.carbonAds?.custom,
Expand Down

0 comments on commit 9c79061

Please sign in to comment.