Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add CSS Modules support (#4852)
Co-authored-by: Chance Strickland <hi@chance.dev>
- Loading branch information
1 parent
768db36
commit 3d58b0a
Showing
31 changed files
with
1,434 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@remix-run/css-bundle": minor | ||
"@remix-run/dev": minor | ||
"@remix-run/react": minor | ||
"@remix-run/server-runtime": minor | ||
"@remix-run/testing": minor | ||
--- | ||
|
||
Add unstable support for CSS Modules via `future.unstable_cssModules` feature flag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
@markdalgleish do you know if there is any plan to change this to a devDependency in the future?
It turns out that
@remix-run/css-bundle
depends on@remix-run/dev
(in order to read the asset manifest at runtime), which in turn depends on things like@babel/core
,esbuild
,lodash
,@vanilla-extract/integration
, etc.I looked into my production Docker image recently and was able to shave 70+MB by simply moving
@remix-run/css-bundle
to a devDependency. As far as I can tell, everything still works as expected. It seems as though thecssBundleHref
value is inlined into the build artifact (at least, for now, on my machine).