|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
import path from 'path'
|
|
|
|
|
import { Alias, AliasOptions } from 'vite'
|
|
|
|
|
import { UserConfig } from './config'
|
|
|
|
|
|
|
|
|
|
const PKG_ROOT = path.join(__dirname, '../../')
|
|
|
|
|
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_REQUEST_PATH = '/' + SITE_DATA_ID
|
|
|
|
|
|
|
|
|
|
export function resolveAliases(
|
|
|
|
|
themeDir: string,
|
|
|
|
|
userConfig: UserConfig
|
|
|
|
|
): AliasOptions {
|
|
|
|
|
export function resolveAliases(themeDir: string): AliasOptions {
|
|
|
|
|
const paths: Record<string, string> = {
|
|
|
|
|
'/@theme': themeDir,
|
|
|
|
|
'/@shared': SHARED_PATH,
|
|
|
|
|