]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
build: pre-shim process in browser build of compiler-sfc
authorEvan You <yyx990803@gmail.com>
Sun, 5 Sep 2021 21:19:49 +0000 (17:19 -0400)
committerEvan You <yyx990803@gmail.com>
Sun, 5 Sep 2021 21:19:49 +0000 (17:19 -0400)
rollup.config.js

index 24242dba5264373e30443951c069b38ac1cb1230..65a3678e777207a44292ef3f507f47b4deb2ea2c 100644 (file)
@@ -230,6 +230,15 @@ function createReplacePlugin(
     // is targeting Node (SSR)?
     __NODE_JS__: isNodeBuild,
 
+    // for compiler-sfc browser build inlined deps
+    ...(isBrowserESMBuild
+      ? {
+          'process.env': '({})',
+          'process.platform': '""',
+          'process.stdout': 'null'
+        }
+      : {}),
+
     // 2.x compat build
     __COMPAT__: isCompatBuild,