chore: remove unused arg

pull/317/head
Evan You 3 years ago
parent dfff1d6966
commit fbcb07eaab

@ -1,6 +1,5 @@
import path from 'path' import path from 'path'
import { Alias, AliasOptions } from 'vite' import { Alias, AliasOptions } from 'vite'
import { UserConfig } from './config'
const PKG_ROOT = path.join(__dirname, '../../') const PKG_ROOT = path.join(__dirname, '../../')
export const APP_PATH = path.join(__dirname, '../client/app') export const APP_PATH = path.join(__dirname, '../client/app')
@ -17,10 +16,7 @@ export const DEFAULT_THEME_PATH = path.join(
export const SITE_DATA_ID = '@siteData' export const SITE_DATA_ID = '@siteData'
export const SITE_DATA_REQUEST_PATH = '/' + SITE_DATA_ID export const SITE_DATA_REQUEST_PATH = '/' + SITE_DATA_ID
export function resolveAliases( export function resolveAliases(themeDir: string): AliasOptions {
themeDir: string,
userConfig: UserConfig
): AliasOptions {
const paths: Record<string, string> = { const paths: Record<string, string> = {
'/@theme': themeDir, '/@theme': themeDir,
'/@shared': SHARED_PATH, '/@shared': SHARED_PATH,

@ -103,7 +103,7 @@ export async function resolveConfig(
outDir: resolve(root, 'dist'), outDir: resolve(root, 'dist'),
tempDir: path.resolve(APP_PATH, 'temp'), tempDir: path.resolve(APP_PATH, 'temp'),
markdown: userConfig.markdown, markdown: userConfig.markdown,
alias: resolveAliases(themeDir, userConfig), alias: resolveAliases(themeDir),
vue: userConfig.vue, vue: userConfig.vue,
vite: userConfig.vite vite: userConfig.vite
} }

Loading…
Cancel
Save