1f65a1a7a8
- 页面:首页/活动/报名/测评/政策/流程/调研/我的 - 自定义 tabBar、骨架屏、后端驱动测评
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
const path = require('path');
|
|
|
|
const config = {
|
|
projectName: 'miniprogram',
|
|
date: '2026-8-20',
|
|
designWidth: 750,
|
|
deviceRatio: { 640: 2.34 / 2, 750: 1, 375: 2, 828: 1.81 },
|
|
sourceRoot: 'src',
|
|
outputRoot: 'dist',
|
|
plugins: [],
|
|
alias: {
|
|
'@': path.resolve(__dirname, '..', 'src')
|
|
},
|
|
defineConstants: {},
|
|
copy: { patterns: [], options: {} },
|
|
framework: 'react',
|
|
compiler: { type: 'webpack5', prebundle: { enable: false } },
|
|
cache: { enable: false },
|
|
mini: {
|
|
postcss: {
|
|
pxtransform: { enable: true, config: {} },
|
|
// limit 调高:内嵌像素字体等小体积资源为 base64,避免运行时路径解析问题
|
|
url: { enable: true, config: { limit: 300000 } },
|
|
cssModules: { enable: false }
|
|
}
|
|
},
|
|
h5: {
|
|
publicPath: '/',
|
|
staticDirectory: 'static',
|
|
postcss: {
|
|
autoprefixer: { enable: true, config: {} },
|
|
cssModules: { enable: false }
|
|
}
|
|
}
|
|
};
|
|
|
|
module.exports = function (merge) {
|
|
if (process.env.NODE_ENV === 'development') {
|
|
return merge({}, config, require('./dev'));
|
|
}
|
|
return merge({}, config, require('./prod'));
|
|
};
|