123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- // ref: https://umijs.org/config/
- export default {
- treeShaking: true,
- routes: [
- {
- path: '/page/videoDetail',
- component: '../pages/Video/VideoDetail'
- },
- {
- path: '/',
- component: '../layouts/index',
- routes: [
- { path: '/', component: '../pages/Live' },
- { path: '/download', component: '../pages/Download/Download' },
- { path: '/avdownload', component: '../pages/SexyDownload/SexyDownload' },
- { path: '/tui_l', component: '../pages/SexyDownload/SexyDownload' },
- { path: '/download/channel', component: '../pages/Download/Download2' },
- { path: '/video', component: '../pages/Video/VideoDetail' },
- { path: '/recharge', component: '../pages/Recharge/Recharge' },
- { path: '/recharge/login', component: '../pages/Recharge/RechargeLogin' }
- ]
- }
- ],
- plugins: [
- // ref: https://umijs.org/plugin/umi-plugin-react.html
- ['umi-plugin-react', {
- antd: false,
- dva: true,
- dynamicImport: false,
- title: '',
- dll: false,
- hd: true,
- routes: {
- exclude: [
- /models\//,
- /services\//,
- /model\.(t|j)sx?$/,
- /service\.(t|j)sx?$/,
- /components\//,
- ],
- },
- headScripts: [
- //react
- '//sp.qn.timichat.com/static/react/16.9.0/react.production.min.js',
- //react-dom
- '//sp.qn.timichat.com/static/react/16.9.0/react-dom.production.min.js',
- //antd-mobile
- '//sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.js',
- // //lottie动画
- // '//sp.qn.timichat.com/static/bodymovin/5.6.8/lottie.min.js'
- ],
- //CDN引入
- links: [
- { href: '//sp.qn.timichat.com/static/antd-mobile/2.3.1/antd-mobile.min.css', rel: 'stylesheet' }
- ],
- }],
- ],
- lessLoaderOptions: {
- javascriptEnabled: true,
- },
- extraBabelPlugins: [
- ["import", { libraryName: "antd-mobile", style: true }] // `style: true` 会加载 less 文件
- ],
- define: {
- 'process.env': process.env
- },
- proxy: {
- '/api-app': {
- target: 'http://h5.timichat.net',//测试
- // target: 'http://h5.timichat.com',//正式
- changeOrigin: true,
- //pathRewrite: { '^/server': '' },
- },
- '/api-common': {
- //target: 'http://api.starbuds.laylib.com',
- target: 'http://h5.timichat.net',
- changeOrigin: true,
- //pathRewrite: { '^/server': '' },
- },
- '/wx': {
- target: 'https://api.weixin.qq.com',
- //target: 'http://h5.paqukeji.com',
- changeOrigin: true,
- pathRewrite: { '^/wx': '' },
- },
- },
- hash: true,
- outputPath: './wxpay',
- publicPath: '/',
- externals: {
- 'react': 'React',
- 'react-dom': 'ReactDOM',
- 'antd-mobile': 'antd-mobile',
- 'lottie-web': 'lottie'
- },
- theme: {
- "brand-primary": "#ff4d5cff",
- "color-text-base": "#333",
- "brand-primary-tap": "rgba(255, 77, 92, 0.8)"
- },
- }
|