Vite/rollup does not shim global, process etc which are not available in a browser (https://github.com/vitejs/vite/issues/1689). This results in the blocking error 'process is not defined' since the variable does not exist.
The current check for isNode look like this:
const isNode = !IS_TEST && process && process.title && process.title.includes('node')
Altering this as follows ensures this is handled properly:
const isNode = !IS_TEST && typeof process !== "undefined" && process.title && process.title.includes('node') solves this issue.
Vite/rollup does not shim
global
,process
etc which are not available in a browser (https://github.com/vitejs/vite/issues/1689). This results in the blocking error 'process is not defined' since the variable does not exist.The current check for
isNode
look like this:const isNode = !IS_TEST && process && process.title && process.title.includes('node')
Altering this as follows ensures this is handled properly:
const isNode = !IS_TEST && typeof process !== "undefined" && process.title && process.title.includes('node')
solves this issue.