feat(cli): postcss plugins can be array (#7560)

This commit is contained in:
neverland
2020-11-15 12:09:09 +08:00
committed by GitHub
parent d78438a899
commit 1b91cd5876
2 changed files with 28 additions and 31 deletions
+1 -14
View File
@@ -7,12 +7,7 @@ import {
outputFileSync,
} from 'fs-extra';
import merge from 'webpack-merge';
import {
SRC_DIR,
getVantConfig,
ROOT_WEBPACK_CONFIG_FILE,
ROOT_POSTCSS_CONFIG_FILE,
} from './constant';
import { SRC_DIR, getVantConfig, ROOT_WEBPACK_CONFIG_FILE } from './constant';
import { WebpackConfig } from './types';
export const EXT_REGEXP = /\.\w+$/;
@@ -117,14 +112,6 @@ export function getWebpackConfig(defaultConfig: WebpackConfig): object {
return defaultConfig;
}
export function getPostcssConfig(): object {
if (existsSync(ROOT_POSTCSS_CONFIG_FILE)) {
return require(ROOT_POSTCSS_CONFIG_FILE);
}
return {};
}
export type ModuleEnv = 'esmodule' | 'commonjs';
export type NodeEnv = 'production' | 'development' | 'test';
export type BuildTarget = 'site' | 'package';