I'm attempting to use microphone-stream which depends on readable-stream in an Angular v18 application. When running locally I receive a series of errors in the console related to globals, Buffer, and process objects all missing, which are core modules from node. I believe these must be polyfilled into the app, but I can't figure out how to do this. There appears to be a very good vite plugin to do this: vite-plugin-node-polyfills but it seems that the vite configuration for angular can't be customized with plugins. My app is using the standard Angular application builder (from angular.json): ... "architect": { "build": { "builder": "@angular-devkit/build-angular:application", ... I did try creating installing the process and buffer and including them in a polyfill like this: window.global = window var process = require('process') var Buffer = require('buffer/').Buffer But that didn't work either. I do realize they are quite old. Continue reading...