chore(@vant/cli): remove lodash-es from deps (#10206)

This commit is contained in:
neverland
2022-01-17 15:43:54 +08:00
committed by GitHub
parent 2892f44af7
commit d4aebef89c
8 changed files with 12 additions and 38 deletions
+2 -3
View File
@@ -1,4 +1,3 @@
import { get } from 'lodash-es';
import { existsSync } from 'fs';
import { join, isAbsolute } from 'path';
import { getVantConfig } from '../common/index.js';
@@ -8,7 +7,7 @@ type CSS_LANG = 'css' | 'less' | 'scss';
function getCssLang(): CSS_LANG {
const vantConfig = getVantConfig();
const preprocessor = get(vantConfig, 'build.css.preprocessor', 'less');
const preprocessor = vantConfig.build?.css?.preprocessor || 'less';
if (preprocessor === 'sass') {
return 'scss';
@@ -23,7 +22,7 @@ export function getCssBaseFile() {
const vantConfig = getVantConfig();
let path = join(STYLE_DIR, `base.${CSS_LANG}`);
const baseFile = get(vantConfig, 'build.css.base', '');
const baseFile = vantConfig.build?.css?.base || '';
if (baseFile) {
path = isAbsolute(baseFile) ? baseFile : join(SRC_DIR, baseFile);
}