fix(ssr): avoid hard-coded ssr checks in cjs builds

This commit is contained in:
Evan You
2020-01-29 09:49:17 -05:00
parent 6b1ce00621
commit bc07e95ca8
8 changed files with 31 additions and 19 deletions

View File

@@ -173,7 +173,7 @@ function createReplacePlugin(
// support compile in browser?
__RUNTIME_COMPILE__: isRuntimeCompileBuild,
// is targeting Node (SSR)?
__SSR__: isNodeBuild,
__NODE_JS__: isNodeBuild,
// support options?
// the lean build drops options related code with buildOptions.lean: true
__FEATURE_OPTIONS__: !packageOptions.lean && !process.env.LEAN,