From 1344294a0f412618d337777d7cfa6664668b41bd Mon Sep 17 00:00:00 2001 From: alamhubb Date: Mon, 16 Sep 2024 08:56:45 +0800 Subject: [PATCH] fix(plugin-vue): allow overwrite esbuild config (#444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 三咲智子 Kevin Deng --- packages/plugin-vue/src/main.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/plugin-vue/src/main.ts b/packages/plugin-vue/src/main.ts index 826ff807..47ffd7df 100644 --- a/packages/plugin-vue/src/main.ts +++ b/packages/plugin-vue/src/main.ts @@ -249,8 +249,11 @@ export async function transformMain( resolvedCode, filename, { - loader: 'ts', target: 'esnext', + // #430 support decorators in .vue file + // target can be overridden by esbuild config target + ...options.devServer?.config.esbuild, + loader: 'ts', sourcemap: options.sourceMap, }, resolvedMap,