HomePhabricator
Diffusion Comm 3e5d4f44ecf0

[lib][web][landing] Update Wagmi and RainbowKit

Description

[lib][web][landing] Update Wagmi and RainbowKit

Summary:
Now that we're using Webpack 5, we can update Wagmi and RainbowKit. I also update some stuff that we need to do to get these packages to work with Webpack 5:

  1. Specified Node polyfills needed for RainbowKit. Webpack 4 automatically included polyfills, but in Webpack 5 we need to specify them manually. I used this handy Gist to point to what I needed
  2. 5 months back, I thought that we would remove the sideEffects: true flag for node_modules CSS files that we needed to put in place to make RainbowKit work with Webpack 4. In contrast, we actually needed to add this flag to the dev config (it was previously only used in the prod config). The reason why is Tree Shaking: basically since we don't actually import anything from the CSS files, Webpack thinks we're not actually using it, and so it doesn't need to be included. sideEffects: true makes Webpack include those CSS files anyways.

Depends on D6702

Test Plan: Tested SIWE on both native/landing and web

Reviewers: atul, tomek

Reviewed By: atul

Differential Revision: https://phab.comm.dev/D6703

Details

Provenance
ashoatAuthored on Feb 12 2023, 11:13 AM
Reviewer
atul
Differential Revision
D6703: [lib][web][landing] Update Wagmi and RainbowKit
Parents
rCOMM2a9da4faadfd: [lib] Use Webpack 5 asset/inline instead of deprecated url-loader
Branches
Unknown
Tags
Unknown