123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- // import px2rem from 'postcss-plugin-px2rem'
- const autoprefixer = require('autoprefixer')
- // ref: https://umijs.org/config/
- export default {
- treeShaking: true,
- routes: [
- {
- path: '/',
- redirect: '/myleval/home'
- },
- {
- path: '/myleval/home',
- name: '我的等级',
- component: '../pages/MyLeval/MyLeval'
- },
- {
- path: '/nobility',
- name: '贵族',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/nobility/home',
- name: '贵族',
- component: '../pages/MyNobility/MyNobility'
- },
- {
- path: '/nobility/explain',
- name: '贵族说明',
- component: '../pages/MyNobility/MyNobilityExplain'
- }
- ]
- },
- {
- path: '/vipinfo/home',
- name: '会员信息',
- component: '../pages/VipInfo/VipInfo'
- },
- {
- path: '/wallettime/home',
- name: '时间钱包',
- component: '../pages/WalletTime/WalletTime'
- },
- {
- path: '/wshop',
- name: '星元商城',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/wshop/home',
- name: '星元商城',
- component: '../pages/WalletShop/WalletShop'
- },
- {
- path: '/wshop/explain',
- name: '星元商城',
- component: '../pages/WalletShop/WalletShopExplain'
- },
- {
- path: '/wshop/record',
- name: '星元商城',
- component: '../pages/WalletShop/BuyRecord'
- },
- ]
- },
- {
- path: '/crRanks/home',
- name: '排行榜',
- component: '../pages/CRRanks/CoinRanks'
- },
- {
- path: '/chatRoom/records',
- name: '房间流水',
- component: '../pages/CRRecords/CoinRecord'
- },
- {
- path: '/giftWall',
- name: '礼物墙',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/giftWall/home',
- name: '礼物墙',
- component: '../pages/GiftWall/GiftWall'
- },
- {
- path: '/giftWall/week',
- name: '本周礼物',
- component: '../pages/GiftWall/GiftWallWeek'
- }
- ]
- },
- {
- path: '/wallet',
- name: '钱包',
- component: '../layouts/BasicLayout',
- routes: [
- {
- path: '/wallet/transDiamond',
- name: '兑换星钻',
- component: '../pages/TransDiamond/TransDiamond'
- },
- {
- path: '/wallet/transDiamond/records',
- name: '兑换记录',
- component: '../pages/TransDiamond/TransDiamondRecords'
- }
- ]
- },
- {
- path: '/login',
- name: '登录',
- component: '../pages/TestLogin/TestLogin'
- }
- ],
- plugins: [
- // ref: https://umijs.org/plugin/umi-plugin-react.html
- ['umi-plugin-react', {
- antd: true,
- dva: false,
- dynamicImport: false,
- title: '',
- dll: false,
- hd: true,
- routes: {
- exclude: [
- /components\//,
- ],
- },
- //CDN引入
- links: [
- { href: 'http://sp.qn.paqukeji.com/static/antd-mobile/2.3.1/antd-mobile.min.css', rel: 'stylesheet' }
- ],
- headScripts: [
- //react
- 'http://sp.qn.paqukeji.com/static/react/16.9.0/react.production.min.js',
- //react-dom
- 'http://sp.qn.paqukeji.com/static/react/16.9.0/react-dom.production.min.js',
- //antd-mobile
- 'http://sp.qn.paqukeji.com/static/antd-mobile/2.3.1/antd-mobile.min.js',
- //lottie动画
- 'http://sp.qn.paqukeji.com/static/bodymovin/5.6.8/lottie.min.js',
- //moment
- 'http://sp.qn.paqukeji.com/static/moment/2.24.0/moment.min.js',
- //UAParser
- 'http://sp.qn.paqukeji.com/static/UAParser/0.7.21/ua-parser.min.js'
- ],
- locale: {
- default: 'zh-CN',
- antd: true
- }
- }],
- ],
- extraPostCSSPlugins: [
- autoprefixer({
- flexbox: true
- }),
- // px2rem({
- // rootValue: 75,
- // // propBlackList:['border','border-top','border-left','border-right','border-bottom','border-radius','font-size'], // 这些属性不需要转换
- // selectorBlackList:['t_npx']
- // })
- ],
- hash: true,
- // exportStatic: {
- // htmlSuffix: true
- // },
- proxy: {
- '/api-app': {
- target: 'http://api.starbuds.laylib.com',
- changeOrigin: true,
- //pathRewrite: { '^/server': '' },
- },
- '/api-common': {
- target: 'http://api.starbuds.laylib.com',
- changeOrigin: true,
- //pathRewrite: { '^/server': '' },
- },
- },
- // publicPath: '/themes/default/template/h5-activity/',
- publicPath: '/',
- outputPath: './inapp',
- copy: [
- {
- "from": "public",
- "to": ""
- }
- ],
- // publicPath: 'http://sp.qn.paqukeji.com/inapp/',
- externals: {
- 'react': 'React',
- 'react-dom': 'ReactDOM',
- 'antd-mobile': 'antd-mobile',
- 'lottie-web': 'lottie',
- 'moment': 'moment',
- 'ua-parser-js': 'UAParser'
- },
- }
|