build: include ssrUtils in server-renderer browser build
This commit is contained in:
parent
2035fa0078
commit
3cfe5f9fc8
@ -325,7 +325,7 @@ const _ssrUtils = {
|
||||
}
|
||||
|
||||
/**
|
||||
* SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
|
||||
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
||||
* @internal
|
||||
*/
|
||||
export const ssrUtils = (__SSR__ ? _ssrUtils : null) as typeof _ssrUtils
|
||||
|
@ -204,7 +204,8 @@ function createConfig(format, output, plugins = []) {
|
||||
!packageOptions.enableNonBrowserBranches,
|
||||
isGlobalBuild,
|
||||
isNodeBuild,
|
||||
isCompatBuild
|
||||
isCompatBuild,
|
||||
isServerRenderer
|
||||
),
|
||||
...nodePlugins,
|
||||
...plugins
|
||||
@ -228,7 +229,8 @@ function createReplacePlugin(
|
||||
isBrowserBuild,
|
||||
isGlobalBuild,
|
||||
isNodeBuild,
|
||||
isCompatBuild
|
||||
isCompatBuild,
|
||||
isServerRenderer
|
||||
) {
|
||||
const replacements = {
|
||||
__COMMIT__: `"${process.env.COMMIT}"`,
|
||||
@ -248,7 +250,7 @@ function createReplacePlugin(
|
||||
// is targeting Node (SSR)?
|
||||
__NODE_JS__: isNodeBuild,
|
||||
// need SSR-specific branches?
|
||||
__SSR__: isNodeBuild || isBundlerESMBuild,
|
||||
__SSR__: isNodeBuild || isBundlerESMBuild || isServerRenderer,
|
||||
|
||||
// for compiler-sfc browser build inlined deps
|
||||
...(isBrowserESMBuild
|
||||
|
Loading…
Reference in New Issue
Block a user