text: const config = {
    projectName: 'taro-demos',
    date: '2018-11-20',
    designWidth: 750,
    deviceRatio: {
      '640': 2.34 / 2,
      '750': 1,
      '828': 1.81 / 2
    },
    sourceRoot: 'src',
    outputRoot: 'dist',
    plugins: {
      babel: {
        sourceMap: true,
        presets: [
          'env'
        ],
        plugins: [
          'transform-class-properties',
          'transform-decorators-legacy',
          'transform-object-rest-spread'
        ]
      }
    },
    // 全局变量设置
    defineConstants: {
    },
    copy: {
      patterns: [
      ],
      options: {
      }
    },
    // 小程序端专用配置
    weapp: {
      module: {
        postcss: {
          autoprefixer: {
            enable: true,
            config: {
              browsers: [
                'last 3 versions',
                'Android >= 4.1',
                'ios >= 8'
              ]
            }
          },
          pxtransform: {
            enable: true,
            config: {
  
            }
          },
          // 小程序端样式引用本地资源内联配置
          url: {
            enable: true,
            config: {
              limit: 10240 // 设定转换尺寸上限
            }
          }
        }
      }
    },
    // H5 端专用配置
    h5: {
      publicPath: '/',
      staticDirectory: 'static',
      module: {
        postcss: {
          autoprefixer: {
            enable: true
          }
        }
      }
    }
  }
  
  module.exports = function (merge) {
    if (process.env.NODE_ENV === 'development') {
      return merge({}, config, require('./dev'))
    }
    return merge({}, config, require('./prod'))
  }
  