const path = require('path') const config = { projectName: 'h5-taro', date: '2026-07-03', designWidth: 750, deviceRatio: { 640: 2.34 / 2, 750: 1, 828: 1.81 / 2, 375: 2 / 1, }, sourceRoot: 'src', outputRoot: 'dist', plugins: [], defineConstants: {}, copy: { patterns: [], options: {}, }, framework: 'react', // compiler: 'webpack4', (default) sass: { data: '', }, mini: { postcss: { pxtransform: { enable: true, config: {} }, url: { enable: true, config: { limit: 1024 } }, cssModules: { enable: false, config: { namingPattern: 'module', generateScopedName: '[name]__[local]___[hash:base64:5]' }, }, }, }, h5: { publicPath: '/h5/', staticDirectory: 'static', router: { mode: 'browser', }, postcss: { autoprefixer: { enable: true, config: {} }, cssModules: { enable: false, config: { namingPattern: 'module', generateScopedName: '[name]__[local]___[hash:base64:5]' }, }, }, }, } module.exports = function (merge) { if (process.env.NODE_ENV === 'development') { return merge({}, config, require('./dev')) } return merge({}, config, require('./prod')) }