mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-27 03:46:35 +08:00
27 lines
461 B
TypeScript
27 lines
461 B
TypeScript
import { getPostcssConfig } from '../common';
|
|
|
|
type PostcssConfig = object & {
|
|
plugins?: object;
|
|
};
|
|
|
|
function mergePostcssConfig(config1: PostcssConfig, config2: PostcssConfig) {
|
|
const plugins = {
|
|
...config1.plugins,
|
|
...config2.plugins,
|
|
};
|
|
|
|
return {
|
|
...config1,
|
|
...config2,
|
|
plugins,
|
|
};
|
|
}
|
|
|
|
const DEFAULT_CONFIG = {
|
|
plugins: {
|
|
autoprefixer: {},
|
|
},
|
|
};
|
|
|
|
module.exports = mergePostcssConfig(DEFAULT_CONFIG, getPostcssConfig());
|