Files
hera-web/config/index.ts
T

43 lines
911 B
TypeScript
Raw Normal View History

2026-10-13 22:50:37 +08:00
import { defineConfig } from '@tarojs/cli'
export default defineConfig(async () => ({
projectName: 'hera-web',
date: '2026-08-12',
designWidth: 750,
deviceRatio: {
640: 2.34 / 2,
750: 1,
828: 1.81 / 2
},
sourceRoot: 'src',
outputRoot: process.env.TARO_ENV === 'h5' ? 'dist-h5' : 'dist',
2026-10-13 22:50:37 +08:00
plugins: ['@tarojs/plugin-framework-react'],
defineConstants: {
API_BASE_URL: JSON.stringify((process.env.HERA_API_BASE_URL || 'http://127.0.0.1:8080').replace(/\/+$/, ''))
},
2026-10-13 22:50:37 +08:00
copy: {
patterns: [],
options: {}
},
framework: 'react',
compiler: 'webpack5',
h5: {
postcss: {
pxtransform: {
enable: true,
config: { baseFontSize: 20, minRootSize: 16, maxRootSize: 40 }
}
}
},
2026-10-13 22:50:37 +08:00
mini: {
postcss: {
pxtransform: {
enable: true,
config: {}
},
cssModules: {
enable: false
}
}
}
}))