From 6f449346c9f471cdba7ee88ce28d015cee67b8cc Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 8 Dec 2024 20:51:42 +0800 Subject: [PATCH] build: fix esm-bundler vapor re-exports --- rollup.config.js | 3 ++- scripts/trim-vapor-exports.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 3ae066514..a3e87dc35 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -167,7 +167,8 @@ function createConfig(format, output, plugins = []) { } let entryFile = - format === 'vapor' + pkg.name === 'vue' && + (format === 'vapor' || format.startsWith('esm-bundler')) ? 'runtime-with-vapor.ts' : /\bruntime\b/.test(format) ? `runtime.ts` diff --git a/scripts/trim-vapor-exports.js b/scripts/trim-vapor-exports.js index 4ccdf8ac4..9bfe6e58c 100644 --- a/scripts/trim-vapor-exports.js +++ b/scripts/trim-vapor-exports.js @@ -13,7 +13,7 @@ export function trimVaporExportsPlugin(format, pkgName) { if ( format === 'vapor' || - format === 'esm-bundler' || + format.startsWith('esm-bundler') || pkgName === '@vue/runtime-vapor' ) { return []