Skip to content

Commit 2217993

Browse files
committed
build: pre-shim process in browser build of compiler-sfc
1 parent 815bfcf commit 2217993

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rollup.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,15 @@ function createReplacePlugin(
230230
// is targeting Node (SSR)?
231231
__NODE_JS__: isNodeBuild,
232232

233+
// for compiler-sfc browser build inlined deps
234+
...(isBrowserESMBuild
235+
? {
236+
'process.env': '({})',
237+
'process.platform': '""',
238+
'process.stdout': 'null'
239+
}
240+
: {}),
241+
233242
// 2.x compat build
234243
__COMPAT__: isCompatBuild,
235244

0 commit comments

Comments
 (0)