123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- import px2rem from 'postcss-plugin-px2rem'
- const autoprefixer = require('autoprefixer')
- // ref: https://umijs.org/config/
- export default {
- treeShaking: true,
- routes: [
- {
- path: '/',
- name: '太空旅行',
- redirect: '/travel/home'
- },
- {
- path: '/travel/home',
- name: '太空旅行',
- component: '../pages/GameTravel/GameTravel',
- },
- {
- path: '/travel/more',
- name: '更多',
- component: '../pages/GameTravel/PageMore',
- },
- {
- path: '/travel/rules',
- name: '旅行规则',
- component: '../pages/GameTravel/TravelRules',
- },
- {
- path: '/travel/gifts',
- name: '礼物清单',
- component: '../pages/GameTravel/TravelGiftList',
- },
- {
- path: '/travel/records',
- name: '旅行记录',
- component: '../pages/GameTravel/TravelRecords',
- },
- {
- path: '/travel/ranks',
- name: '旅行排行',
- component: '../pages/GameRanks/CoinRanks',
- },
- ],
- 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']
- // })
- ],
- extraBabelPlugins: [
- ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
- ],
- 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': '' },
- },
- },
- outputPath: './travelgame',
- copy: [
- {
- "from": "public",
- "to": ""
- }
- ],
- publicPath: '', // 'http://sp.qn.paqukeji.com/jewelbox/',
- externals: {
- 'react': 'React',
- 'react-dom': 'ReactDOM',
- 'antd-mobile': 'antd-mobile',
- 'lottie-web': 'lottie',
- 'moment': 'moment',
- 'ua-parser-js': 'UAParser'
- },
- }
|