123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- import px2rem from 'postcss-plugin-px2rem'
- const autoprefixer = require('autoprefixer')
- // ref: https://umijs.org/config/
- export default {
- treeShaking: true,
- routes: [
- {
- path: '/',
- component: '../layouts/index',
- routes: [
- {
- path: '/',
- redirect: '/popularize10',
- },
- {
- path: '/popularize01',
- name: '星芽',
- component: '../pages/Popularize01/Popularize01'
- },
- {
- path: '/popularize02',
- name: '星芽',
- component: '../pages/Popularize02/Popularize02'
- },
- {
- path: '/popularize03',
- name: '星芽',
- component: '../pages/Popularize03/Popularize03'
- },
- {
- path: '/popularize04',
- name: '星芽',
- component: '../pages/Popularize04/Popularize04'
- },
- {
- path: '/popularize05',
- name: '星芽',
- component: '../pages/Popularize05/Popularize05'
- },
- {
- path: '/popularize06',
- name: '星芽',
- component: '../pages/Popularize06/Popularize06'
- },
- {
- path: '/popularize07',
- name: '星芽',
- component: '../pages/Popularize07/Popularize07'
- },
- {
- path: '/popularize08',
- name: '星芽',
- component: '../pages/Popularize08/Popularize08'
- },
- {
- path: '/popularize09',
- name: '星芽',
- component: '../pages/Popularize09/Popularize09'
- },
- {
- path: '/tui_l',
- name: '星芽',
- component: '../pages/Popularize10/Popularize10'
- },
- {
- path: '/popularize10',
- name: '星芽',
- component: '../pages/Popularize10/Popularize10'
- },
- {
- path: '/popularize11',
- name: '星芽',
- component: '../pages/Popularize11/Popularize11'
- },
- {
- path: '/popularize12',
- name: '菠萝街',
- component: '../pages/Popularize12/DownloadBoluojie'
- }
- ]
- }
- ],
- plugins: [
- // ref: https://umijs.org/plugin/umi-plugin-react.html
- ['umi-plugin-react', {
- antd: true,
- dva: false,
- dynamicImport: false,
- title: '',
- dll: false,
- hd: false,
- routes: {
- exclude: [
- /components\//,
- ],
- },
- }]
- ],
- extraPostCSSPlugins: [
- autoprefixer({
- flexbox: true
- }),
- px2rem({
- rootValue: 37.5,
- // 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 文件
- ],
- externals: {
- 'react': 'React',
- 'react-dom': 'ReactDOM',
- 'antd-mobile': 'antd-mobile'
- },
- hash: true,
- // exportStatic: {
- // htmlSuffix: true
- // },
- 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': '' },
- },
- },
- // publicPath: '/themes/default/template/h5-activity/',
- publicPath: '', // 'http://sp.qn.paqukeji.com/popularize/',
- outputPath: './popularize',
- copy: [
- {
- "from": "public",
- "to": ""
- }
- ],
- define: {
- 'PAGE_TYPE': 'starbuds'
- }
- }
|