config-overrides_20190415122743.js 543 Bytes
Newer Older
baiguangyao committed
1 2 3 4
const {
    override,
    fixBabelImports,
    addLessLoader,
5
    addDecoratorsLegacy
baiguangyao committed
6 7 8
} = require("customize-cra");

module.exports = override(
9
    addDecoratorsLegacy(),
baiguangyao committed
10 11 12 13 14 15 16 17
    fixBabelImports("import", {
        libraryName: "antd-mobile", 
        libraryDirectory: "es", 
        style: true // change importing css to less
    }),
    addLessLoader({
        javascriptEnabled: true,
        modifyVars: { '@primary-color': '#1DA57A' },
18
        localIdentName: '[local]--[hash:base64:5]' // 自定义 CSS Modules 的 localIdentName
baiguangyao committed
19 20
    }),
)