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
|
* @internal
|
||||||
*/
|
*/
|
||||||
export const ssrUtils = (__SSR__ ? _ssrUtils : null) as typeof _ssrUtils
|
export const ssrUtils = (__SSR__ ? _ssrUtils : null) as typeof _ssrUtils
|
||||||
|
@ -204,7 +204,8 @@ function createConfig(format, output, plugins = []) {
|
|||||||
!packageOptions.enableNonBrowserBranches,
|
!packageOptions.enableNonBrowserBranches,
|
||||||
isGlobalBuild,
|
isGlobalBuild,
|
||||||
isNodeBuild,
|
isNodeBuild,
|
||||||
isCompatBuild
|
isCompatBuild,
|
||||||
|
isServerRenderer
|
||||||
),
|
),
|
||||||
...nodePlugins,
|
...nodePlugins,
|
||||||
...plugins
|
...plugins
|
||||||
@ -228,7 +229,8 @@ function createReplacePlugin(
|
|||||||
isBrowserBuild,
|
isBrowserBuild,
|
||||||
isGlobalBuild,
|
isGlobalBuild,
|
||||||
isNodeBuild,
|
isNodeBuild,
|
||||||
isCompatBuild
|
isCompatBuild,
|
||||||
|
isServerRenderer
|
||||||
) {
|
) {
|
||||||
const replacements = {
|
const replacements = {
|
||||||
__COMMIT__: `"${process.env.COMMIT}"`,
|
__COMMIT__: `"${process.env.COMMIT}"`,
|
||||||
@ -248,7 +250,7 @@ function createReplacePlugin(
|
|||||||
// is targeting Node (SSR)?
|
// is targeting Node (SSR)?
|
||||||
__NODE_JS__: isNodeBuild,
|
__NODE_JS__: isNodeBuild,
|
||||||
// need SSR-specific branches?
|
// need SSR-specific branches?
|
||||||
__SSR__: isNodeBuild || isBundlerESMBuild,
|
__SSR__: isNodeBuild || isBundlerESMBuild || isServerRenderer,
|
||||||
|
|
||||||
// for compiler-sfc browser build inlined deps
|
// for compiler-sfc browser build inlined deps
|
||||||
...(isBrowserESMBuild
|
...(isBrowserESMBuild
|
||||||
|
Loading…
Reference in New Issue
Block a user