import { defineConfig } from '@umijs/max';
import proxy from './proxy';
import routes from './routes';
const IS_PROD = process.env.NODE_ENV === 'production' ? true : false;
export default defineConfig({
  antd: {
    theme: {
      token: {
        colorPrimary: '#8ebcfe', //主题色
        fontSize: 14,
        multipleItemHeightLG: 42,
        controlHeightLG: 43, //较高的组件高度
      },
    },
    styleProvider: {
      hashPriority: 'high',
      legacyTransformer: true,
    },
  },
  scripts: [],
  access: {},
  model: {},
  initialState: {},
  request: {},
  proxy,
  title: '成都市城市综合管理服务平台',
  routes,
  codeSplitting: {
    jsStrategy: 'granularChunks',
  },
  cssLoaderModules: {
    exportLocalsConvention: 'camelCase',
  },
  headScripts: [
    {
      src: IS_PROD
        ? 'https://10.1.174.34:13600/gis/example/CooGL/CooGL.js'
        : 'http://123.157.223.158:30010/CooGL/version/v1.4/CooGL.js',
    },

    // {
    //   src: '//api.map.baidu.com/api?type=webgl&v=1.0&ak=U5XoaKW8QCNaROPQ96oh5a7NlVP9N4hW"',
    // },
  ],
  base: '/cd-comprehensive/',
  publicPath: '/cd-comprehensive/',
  hash: true,
  npmClient: 'pnpm',
});
