Skip to content

Commit ee4cbae

Browse files
committed
fix(runtime-core): expose ssrUtils in esm-bundler build
this is necessary for worker environments where Vue needs to be bundled (instead of using cjs build via Node.js require) fix #4199
1 parent 561e210 commit ee4cbae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/runtime-core/src/index.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ const _ssrUtils = {
313313
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
314314
* @internal
315315
*/
316-
export const ssrUtils = (__NODE_JS__ ? _ssrUtils : null) as typeof _ssrUtils
316+
export const ssrUtils = (
317+
__NODE_JS__ || __ESM_BUNDLER__ ? _ssrUtils : null
318+
) as typeof _ssrUtils
317319

318320
// 2.x COMPAT ------------------------------------------------------------------
319321

0 commit comments

Comments
 (0)