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: '/', component: '../pages/Popularize10/Popularize10', name: 'yaya' } ] } ], 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": "" } ] }