From 0bfb3621e89656dd5fc01331e5daf12a06666d3a Mon Sep 17 00:00:00 2001 From: qiang Date: Wed, 30 Nov 2022 18:00:55 +0800 Subject: [PATCH] fix: disable transform-async for mp --- template/common/babel.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/template/common/babel.config.js b/template/common/babel.config.js index 4c1134b..663b115 100644 --- a/template/common/babel.config.js +++ b/template/common/babel.config.js @@ -61,7 +61,8 @@ const config = { '@vue/app', { modules: webpack.version[0] > 4 ? 'auto' : 'commonjs', - useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry' + useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry', + exclude: ['h5', 'app-plus'].includes(process.env.UNI_PLATFORM) ? undefined : ['@babel/plugin-transform-async-to-generator', '@babel/plugin-transform-regenerator'] } ] ],