Closed mzaatar closed 1 year ago
@ShogunPanda could you check if we will need this kind of hacks in v4 too?
I would love to. @mzaatar As I'm not familiar with Remix, would you please share a minimum unpatched repo example I can play it?
Ok, I've checked with a minimal repro. readable-stream v4 by design choice will never modify the global scope and thus process
, Buffer
or similar will be unavailable.
Anyway, we have solution for all major bundlers, as we use them in our CI process. In @mzaatar example we're talking about esbuild (which is used by Remix internally).
The step to solve the bug are:
remix.config.js
:
const { withEsbuildOverride } = require('remix-esbuild-override')
withEsbuildOverride((option, { isServer, isDev }) => {
option.inject.push([__dirname + '/esbuild-browsers-shims.mjs'])
return option
})
esbuild-browsers-shims.mjs
with the same contents of this file.I think we can close this!
@mcollina Do you think we should add information about the bundlers in the README? Enjoy!
Add it inside the bundlers section.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
readable-stream@3.6.0
for the project I'm working on.I'm using this library (as a sub-dependency of Terra Station wallet in a Remix and this library throws an exception on client-side
process is not defined
Here is the diff that solved my problem (after polyfill
process
to client):This issue body was partially generated by patch-package.