nomadro/apps/miniprogram/babel.config.js
eric 626f6b19e8 Ship unified miniprogram H5/weapp parity and XHS offline portal.
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>
2026-09-30 09:37:03 +08:00

17 lines
367 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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' } : {}),
},
],
],
}