web: add CSS-modules support
Created by: valerybugakov
Changes
- Added configuration for CSS modules as per RFC.
- Updated Webpack configs for a web app, browser extension, and Storybook.
- Changed
BrandedStory
CSS injection: instead of inlining style tag after story content, it now prepends style tag to the document head. It's done to keep CSS modules priority higher compared to other styles. - Refactored
PageSelector
component to CSS modules.
Note
For some reason, Chromatic shows diffs for multiple stories. Probably it's related to BrandedStory
changes. But after looking into these stories with dev tools, I cannot find any differences with stories from main. Let me know if you see how they are different.
Closes #19953.