import { defineConfig } from 'umi'; export default defineConfig({ nodeModulesTransform: { type: 'none', }, plugins: ['@alitajs/hd'], hd: { theme: {}, px2rem: { rootValue: 100, unitPrecision: 5, propWhiteList: [], propBlackList: [], exclude: false, selectorBlackList: [], ignoreIdentifier: false, replace: true, mediaQuery: true, minPixelValue: 0, }, }, extraBabelPlugins: [ ['import', { libraryName: 'antd-mobile', style: true }], // `style: true` 会加载 less 文件 ], routes: [ { path: '/', component: '@/pages/index', title: '直播下载' }, { path: '/success', component: '@/pages/Success', title: '成功' }, { path: '/channel/center', component: '@/pages/MyInviteCenter/MyInviteCenter', title: '邀好友 赚收益', }, { path: '/channel/record', component: '@/pages/MyInviteCenter/InviteRecord', title: '邀请明细', }, { path: '/channel/banner', component: '@/pages/MyInviteCenter/Banner', title: '分享海报', }, { path: '/security', component: '@/components/Security/Security', title: '人机校验', }, ], proxy: { '/api-app': { target: 'http://api.starbuds.laylib.com', //target: 'http://h5.paqukeji.com', changeOrigin: true, //pathRewrite: { '^/server': '' }, }, '/api-common': { target: 'http://api.starbuds.laylib.com', //target: 'http://h5.paqukeji.com', changeOrigin: true, //pathRewrite: { '^/server': '' }, }, }, hash: true, outputPath: './invite', //CDN引入 links: [ { href: 'http://sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.css', rel: 'stylesheet', }, ], headScripts: [ //react 'http://sp.qn.timichat.com/static/react/16.9.0/react.production.min.js', //react-dom 'http://sp.qn.timichat.com/static/react/16.9.0/react-dom.production.min.js', //antd-mobile 'http://sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.js', ], });