__dirname undefined

Hi,I am using angularv9.1.11 and with electron v9.0.4.
while doing ng serve --prod getting __dirname is not defined an error on browser console.

main.be03a5ad9234bc0bd2e5.js:1 Uncaught ReferenceError: __dirname is not defined
at Object.vbkW (main.be03a5ad9234bc0bd2e5.js:1)
at n (runtime.65df2ba8e734a9550519.js:1)
at Object.ax/6 (main.be03a5ad9234bc0bd2e5.js:1)
at n (runtime.65df2ba8e734a9550519.js:1)
at Object.bnov (main.be03a5ad9234bc0bd2e5.js:1)
at n (runtime.65df2ba8e734a9550519.js:1)
at Object.J4hL (main.be03a5ad9234bc0bd2e5.js:1)
at n (runtime.65df2ba8e734a9550519.js:1)
at Module.QqbR (main.be03a5ad9234bc0bd2e5.js:1)
at n (runtime.65df2ba8e734a9550519.js:1)