qlin b7308f445e
feat: 升级vite8 (#276)
Co-authored-by: qlin <qlin@webank.com>
2026-04-28 20:45:13 +08:00

29 lines
584 B
TypeScript

import type { UserConfig } from '../../types';
import { set, get } from 'es-toolkit/compat';
interface UpdateUserConfigWithKeyOptions {
key: string;
value: any;
userConfig: UserConfig;
}
interface GetUserConfigWithKeyOptions {
key: string;
userConfig: UserConfig;
}
export function updateUserConfigWithKey({
key,
value,
userConfig,
}: UpdateUserConfigWithKeyOptions): void {
set(userConfig, key, value);
}
export function getUserConfigWithKey({
key,
userConfig,
}: GetUserConfigWithKeyOptions): any {
return get(userConfig, key);
}