nomadro/apps/ebook/dymini/miniapp/config/index.ts
eric d93a355fd5 Migrate navmini/ebook/nomadweb into apps/ as same-origin portal subpaths.
Shield external portal jumps (keep EXTERNAL_* for later), serve /nav from static build, and proxy /book + /community to vertical Next apps with Caddy notes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 03:30:34 -05:00

68 lines
1.4 KiB
TypeScript

import path from 'path'
import { defineConfig, type UserConfigExport } from '@tarojs/cli'
export default defineConfig(async (merge) => {
const baseConfig: UserConfigExport = {
projectName: 'dymini',
date: '2026-9-24',
designWidth: 750,
deviceRatio: {
640: 2.34 / 2,
750: 1,
375: 2,
828: 1.81 / 2,
},
sourceRoot: 'src',
outputRoot: 'dist',
plugins: ['@tarojs/plugin-framework-react'],
defineConstants: {
TARO_APP_API: JSON.stringify(
process.env.TARO_APP_API || 'https://dyapi.nomadro.cn',
),
},
copy: {
patterns: [],
options: {},
},
framework: 'react',
compiler: {
type: 'webpack5',
prebundle: {
enable: false,
},
},
cache: {
enable: false,
},
alias: {
'@': path.resolve(__dirname, '..', 'src'),
},
mini: {
postcss: {
pxtransform: {
enable: true,
config: {},
},
cssModules: {
enable: false,
},
},
},
h5: {
publicPath: '/',
staticDirectory: 'static',
postcss: {
autoprefixer: { enable: true },
cssModules: { enable: false },
},
},
}
if (process.env.NODE_ENV === 'development') {
return merge({}, baseConfig, {
logger: { quiet: false, stats: true },
})
}
return merge({}, baseConfig)
})