- 使用 uni-app + Vue 3 + Composition API 重写 H5 用户端 - 6 个页面:登录、首页、设备列表、设备详情、仓体详情、个人中心 - Pinia 状态管理 + API 层封装 - TabBar 导航(首页/设备/我的) - 已构建并部署到服务器 /data/pms/h5/ - 登录页渲染正常,布局完整
59 lines
1.2 KiB
JavaScript
59 lines
1.2 KiB
JavaScript
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',
|
|
basename: '/h5/',
|
|
},
|
|
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'))
|
|
}
|