I'm implementing a mini CSS library with SASS and I want to purge that, currently I'm using purgecss and I have no issue with that but one problem is that when I add a class to my html from my CSS library, that specific class doesn't get included in my purged file and I need to repurge my CSS library CSS file to include that specific class but I need to purgecss watches my CSS file and add classes while I'm adding it to my project and I don't need to repurge my CSS file, so any idea?
why I can't update my css file via purgecss?
196 Views Asked by scorpian111 At
1
There are 1 best solutions below
Related Questions in CSS
- CSS Class is not applying to element (border width,color,and style attributes)
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
- Positioning child at bottom of parent with scroll
- Play multiple audio files in a slider
- How to set text over image?
- Website zoomed out on Android default browser
- Writing/Overwriting to specific XML file from ASP.NET code behind
- My navbar is not expanding after collapse
- when a checkbox is checked how to display a different hidden element using javascript
- Gaps Vertically Using Dividers
- CSS: Preventing a property to affect on element until the end of transition
- Polygon Button with pure CSS
- transform-origin doesnt apply in safari
- show/hide multiple div tags at once and change the size of the remaining div tag
- Mask the image/maps/div (circle) using css and jquery
Related Questions in SASS
- Gulp wont restart in any of my projects
- Gulp Sass not compiling partials
- Compile SASS files in separate folder with relative assets/urls?
- SASS illegal nesting
- How to make :hover more mobile friendly and accessible?
- Elixir not creating multiple css files
- Editing sass in server
- use sass transformer in intellij dart
- How to load different Scss files with Meteor routed pages
- Strange SASS output when using extends
- Grunt - Compile and import separate sass in dev, but concatenate them when build
- gulp concat after sass
- Ampersand not working in :before in SASS
- How to get started with scssphp
- sass-rails depends on sass v3.2, I need sass v3.4. What is sass-rails' "gemfiles" directory for, and will it help me use sass v3.4?
Related Questions in PURGECSS
- Vue build Generating CSS file twice when using Webpack & PurgeCSS
- How to use purgecss for WordPress with Gulp
- why I can't update my css file via purgecss?
- gatsby purge css plugin not installing
- Adding @fullhuman/postcss-purgecss in postcss.config.js breaks the css next.js
- How can I resolve the 'Critical dependency: the request of a dependency is an expression' warning in webpack when using PurgeCSS?
- Why PurgeCSS in Next.js removes all website styles? Need assistance with the configuration
- PurgeCSS purged needed style for Bootstrap attribute
- vite bundle skeleton ui -- safelisting skeleton-tailwind utility classes
- How do I run PurgeCSS on local URLs?
- Remove unused CSS in Angular using PurgeCSS
- Make webpack use different postcss/purgecss configs for different entries within one file
- PurgeCss not working in Nextjs 13 version
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
To dynamically include classes from your CSS library without having to manually repurge the CSS file, you can use a combination of PurgeCSS and an additional configuration file for PurgeCSS to watch your CSS file and include specific classes.
Here's how you can set it up:
purgecss.config.js. This file will specify the files to be purged and any additional configuration options.Make sure to adjust the paths and file names in the code snippets above to match your project structure. Additionally, if you're using a different build system or tool, you may need to adapt the configuration accordingly.
With this setup, you won't need to manually repurge your CSS file every time you add a class from your CSS library to your project. Instead, PurgeCSS will watch for changes and include the classes dynamically during the build process.