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
This commit is contained in:
Evan You 2021-07-27 17:59:13 -04:00
parent 561e210157
commit ee4cbaeec9

View File

@ -313,7 +313,9 @@ const _ssrUtils = {
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
* @internal
*/
export const ssrUtils = (__NODE_JS__ ? _ssrUtils : null) as typeof _ssrUtils
export const ssrUtils = (
__NODE_JS__ || __ESM_BUNDLER__ ? _ssrUtils : null
) as typeof _ssrUtils
// 2.x COMPAT ------------------------------------------------------------------