Skip to content

Commit

Permalink
[landing] added sideEffects to solve node_module CSS (rainbowkit) not…
Browse files Browse the repository at this point in the history
… being added in production

Summary: RainbowKit's CSS doesn't get bundled in production, because the way they're exposing it is with a sideEffect. Webpack's side effects are basically an infinite black hole, as denoted by [[ webpack/webpack#6571 | this issue ]] that's been open for 4.5 years. more context/explanation on [[ https://stackoverflow.com/a/49203452 | this stack overflow answer  ]]

Test Plan: run `yarn prod` in `landing` with this diff and RainbowKit experience found on `localhost/commlanding/siwe` now has more than 0 styles

Reviewers: atul, varun, abosh, ashoat

Reviewed By: ashoat

Subscribers: tomek, abosh, varun, ashoat, atul

Differential Revision: https://phab.comm.dev/D5224
  • Loading branch information
dereknelson committed Sep 26, 2022
1 parent 49d61c2 commit 999e610
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/webpack/shared.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ function createProdBrowserConfig(baseConfig, babelConfig) {
},
{
test: /node_modules\/.*\.css$/,
sideEffects: true,
use: [
cssExtractLoader,
{
Expand Down

0 comments on commit 999e610

Please sign in to comment.