Align Taro pages with Next hub/nav/book/community/VIP, pack the single-index Xiaohongshu portal with host-chrome safe areas, and refresh shared book content plus portal README constraints. Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
367 B
JavaScript
17 lines
367 B
JavaScript
const isH5 =
|
||
process.env.TARO_APP_TARGET === 'h5' || process.env.TARO_ENV === 'h5'
|
||
|
||
module.exports = {
|
||
presets: [
|
||
[
|
||
'taro',
|
||
{
|
||
framework: 'react',
|
||
ts: true,
|
||
// H5 用 Vite;微信/抖音用 webpack5 —— 勿写死 vite,否则 weapp 解析 TS 会挂
|
||
...(isH5 ? { compiler: 'vite' } : {}),
|
||
},
|
||
],
|
||
],
|
||
}
|