const useVite = String(process.env.TARO_COMPILER || '').toLowerCase() === 'vite' module.exports = { presets: [ [ 'taro', { framework: 'react', ts: true, // Vite 小程序需声明;webpack 勿写死,否则解析异常 ...(useVite ? { compiler: 'vite' } : {}), }, ], ], }