123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- 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: '/download', component: '@/pages/download', 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: '人机校验',
- },
- {
- path: '/market',
- title: 'TiMi语音',
- component: '@/pages/Market.tsx',
- },
- {
- path: '/promote',
- title: 'TiMi语音',
- component: '@/pages/Promote.tsx',
- },
- ],
- proxy: {
- '/api-app': {
- target: 'http://api.timichat.net',
- //target: 'http://h5.paqukeji.com',
- changeOrigin: true,
- //pathRewrite: { '^/server': '' },
- },
- '/api-common': {
- target: 'http://api.timichat.net',
- //target: 'http://h5.paqukeji.com',
- changeOrigin: true,
- //pathRewrite: { '^/server': '' },
- },
- },
- hash: true,
- outputPath: './iv',
- //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',
- ],
- });
|