floating / frame

System-wide Web3 for macOS, Windows and Linux
https://frame.sh
GNU General Public License v3.0
1.09k stars 150 forks source link

Fix parcel buffer install when building prod #1517

Closed goosewobbler closed 1 year ago

goosewobbler commented 1 year ago

Parcel is still complaining about buffer not being installed when building prod even though we removed it from the renderer builds. I think this is related to the below issue:

https://github.com/parcel-bundler/parcel/issues/7697

I checked all dependency usage of buffer via npm ls buffer and all of the imports for deps which have a dependency on buffer are in the main process. However, setting the alias to "buffer" instead of false does fix the issue without breaking the build.

mholtzman commented 1 year ago

@goosewobbler it seems like parcel has some sort of trigger where it sees that process is defined and determines that this is a node process and thus wants to install buffer. do we have any idea why that's happening or if there's a way to fix that root cause?

otherwise I think this is a fine workaround for the time being

goosewobbler commented 1 year ago

I'm not sure that is what's happening, let alone why - how did you verify that? I tried removing all references to process in the renderer and that did nothing.

mholtzman commented 1 year ago

I'm not sure that is what's happening, let alone why - how did you verify that? I tried removing all references to process in the renderer and that did nothing.

didnt verify it just saw it mentioned in a few places, thought it might be good to understand why this is happening, but either way I think going w. this fix is fine for now.