-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
React-bootstrap component css missing #491
Comments
Same happens for me. I'm using this recommended way with Next.js and |
Same issue for me. I'm using the next-purgecss component and people seem to have the same problem: lucleray/next-purgecss#48 |
is there a solution to this already? I am running into the same problem where css used by react-bootstrap are being deleted my setup for
|
We have the same problem. I think the main reason is this plugin removes unused CSS by existing words. But React-Bootstrap generates class names dynamically. |
After troubleshooting this issue for a while, I found a solution. In our case, it seemed purgecss + react-bootstrap was working except for the column and navbar classes. To fix this, I added the regex expression for classes that start with "col", "navbar", and "nav". Here is our postcss.config.css: `module.exports = {
}; ` Also, I found that purgecss sometimes wouldn't run after changing postcss.config.js in my dev environment. To ensure the changes are being read, you can restart your server and comment out then comment back in a CSS/SCSS import such as @import "../node_modules/bootstrap/scss/bootstrap" in your globals.scss file. I think the change in CSS files being read triggers purgecss to run again. I'm not positive if that is the correct approach but I figured I'd mention it just in case. Here's our before and after. P.S. The "Start Writing" button should actually be white but I'm sure that's just another small change in the postcss.config.js file. |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Before you open an issue, please check if a similar issue already exists or has been closed before.
When reporting a bug, please try to include the following:
expect use component like Col, but css not appear in dev tools
"^3.0.0"
i want the css not missing
The text was updated successfully, but these errors were encountered: