Skip to content

Commit

Permalink
Fix CSS duplication from the Help Center chunk
Browse files Browse the repository at this point in the history
  • Loading branch information
alshakero committed Dec 13, 2024
1 parent bf5ac71 commit 1439e72
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,18 @@ const AsyncHelpCenter = () => {
setShowHelpCenter( false );
}, [ setShowHelpCenter ] );

/**
* The ?v2 query parameter ensures Webpack treats this Help Center as separate from the one in the main client app.
* Without it, Webpack would create one shared chunk, loaded in both apps. Since Stepper is smaller, more CSS would
* need be bundled into that shared chunk. This is great for Stepper, but it duplicates the CSS in the main client app.
* See: #97451
*/
return (
<AsyncLoad require="@automattic/help-center" placeholder={ null } handleClose={ handleClose } />
<AsyncLoad
require="@automattic/help-center?v2"
placeholder={ null }
handleClose={ handleClose }
/>
);
};

Expand Down

0 comments on commit 1439e72

Please sign in to comment.