From 2217993897eb601a10db45bd3d94b23b60557d65 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sun, 5 Sep 2021 17:19:49 -0400 Subject: [PATCH] build: pre-shim process in browser build of compiler-sfc --- rollup.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rollup.config.js b/rollup.config.js index 24242dba..65a3678e 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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,