-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add docs for the css experiment #6919
Conversation
@burhanuday is attempting to deploy a commit to the Webpack Docs Team on Vercel. A member of the Team first needs to authorize it. |
|
||
Experimental features: | ||
|
||
- Inbuilt support for CSS and CSS Modules. Use the `.module.css` extension for CSS Modules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to clarify what you shoudl set css/auto
to enable this, I think in future we should use css/auto
by default for any CSS files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on the filename, we automatically use css modules rule
https://github.com/webpack/webpack/blob/dc4d97429b2013f7770ba785721b65cf82c2ef04/lib/config/defaults.js#L728-L729
dont need to set css/auto explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah, missing that
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
- CSS Modules support: webpack will generate a unique name for each CSS class. Use the `.module.css` extension for CSS Modules. | ||
- <Badge text="5.87.0+" /> Style-specific fields resolution in `package.json` files: | ||
webpack will look for `style` field in `package.json` files and use that if it | ||
exists for imports inside CSS files. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe include an example for this list item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, did you insert many soft line breaks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, did you insert many soft line breaks?
Strange. The line break gets added by prettier. Was able to remove it from one point but not the other
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe include an example for this list item?
It is a little difficult to explain that point with an example since it has to do with module resolution inside of node_modules
folder. Will give it a try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe include an example for this list item?
Added an example with using bootstrap since they do have that field in their package.json file https://github.com/twbs/bootstrap/blob/main/package.json#L40
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, did you insert many soft line breaks?
This is happening due to MDX component Badge. VSCode considers the file as markdown and thats just how it formats it for me 😅
04467d9
to
fb52f79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks.
describe your changes...
Closes #6909
Add documentation for
experiments.css