Questions tagged [css-purge]

A CSS tool written in Node JS as a command line app or library for the purging, burning, reducing, shortening, compressing, cleaning, trimming and formatting of duplicate, extra, excess or bloated CSS.

More information here: https://www.npmjs.com/package/css-purge

90 questions
1
vote
1 answer

when using for loop in gulp, It gives me warning of MaxListenersExceededWarning, is there any other way to do it

I am basically trying to use gulp in my nodeJS project where I want to make a separate css files for every view file (.ejs), and store it in a public/compiled/example/ folder. The example folder will have the name of the ejs file, likewise I want to…
1
vote
0 answers

Vue CLI, Tailwind, purgecss and node_modules

Using vue-cli for a little app. The app brings in vue components from another vue-cli app: Footer: () => import('my-components/src/components/footer.vue') Running vue-cli-service serve, the app shows all the necessary CSS. But using vue-cli-service…
Leads
  • 839
  • 2
  • 10
  • 27
1
vote
0 answers

Tailwind missing classes when on Heroku

I have designed a beautiful page in tailwind on my Rails app and on my development server it looks great. But when I push it to Heroku so many classes disappear. Anything that uses the screen width tags (lg:w-1/4) doesn't work. I have a beautiful…
user1895399
  • 147
  • 1
  • 10
1
vote
0 answers

PurgeCSS: how to match css with backslash

I am using csspurge using the config file. I have css written as lg\:right-40 and in js it is referred as lg:right-40. in js backslash is escaped hence purgecss is not able identify all the that contain \ cssfile .lg\:right-40 { right:…
Manjunath Gk
  • 412
  • 1
  • 4
  • 13
1
vote
0 answers

Remove unused CSS in NextJS (10.0.0) application

Using React-bootstrap in our NextJS (10.0.0) app and need to remove unused CSS so using purgecss for that. But all the CSS are getting removed after doing like in this https://purgecss.com/guides/next.html. And found that issue is because of CSS…
Dr tech
  • 11
  • 4
1
vote
2 answers

custom button component + tailwind styles being purged

I want to create a button component like this: function Button ({ color }) { return ( That way I can make all of my button colors (with hover…
Scott Barrar
  • 157
  • 1
  • 7
1
vote
1 answer

I want to purge down my custom build tailwindcss file to smaller in size

This is how my package.json file looks like. "scripts": { "start": "yarn run watch-css && craco start", "build": "yarn run build-css && craco build", "test": "craco test", "eject": "react-scripts eject", "build-css": "craco src/index.css -o…
1
vote
2 answers

TailwindCSS / PurgeCSS whitelist not working

I can't seem to get PurgeCSS to whitelist classes I use dynamically in the CMS. Here are my config files: /* postcss.config.js */ const purgecss = require('@fullhuman/postcss-purgecss') module.exports = { plugins: [ …
Jonathan
  • 49
  • 1
  • 7
1
vote
1 answer

How to use purgeCss with other module exports?

I would like to use purgeCss in my NextJS project. In the docs it says I should change my next.config.js to be like this: module.exports = withCss(withPurgeCss()) But where do I set my current config? module.exports = { distDir: '../.next', …
strangeQuirks
  • 4,761
  • 9
  • 40
  • 67
1
vote
1 answer

Why gulp-purgecss whitelist is not working

Hello I am using Gulp for compiling and Tailwind as framework. I would like to use Purgecss, it is working but it ignores my whitelist, some help? Here the code example: function css() { const tailwindcss = require('tailwindcss'); return…
Luca Spezzano
  • 371
  • 2
  • 14
1
vote
1 answer

PurgeCSS ignores the used classes

Fairly new to Tailwind and PostCSS/PurgeCSS, im trying to reduce the size of my CSS file. Before adding some custom css in the tailwind.css file below @tailwind base... and some variables like h-(screen-1.5) in my tailwind.config file, i have…
Elchy
  • 171
  • 5
  • 16
1
vote
0 answers

PostCSS: PurgeCSS not working when task is run

I'm currently trying to remove unused CSS from a project's stylesheets. I have a gulp task sass where all the compiling is being done. I'm using postcss and a plugin for purgecss. However, when I run the sass task purgecss doesn't seem to be…
Steven Aguilar
  • 3,107
  • 5
  • 39
  • 89
1
vote
0 answers

How to remove unwanted css and js from your django application?

I'm making a Fullstack application which uses Django as a backend and javascript and jquery as a frontend.The app is finished now I want to remove unwanted css,images,js which just lie there in static files but are not used in templates is there a…
1
vote
0 answers

why purgecss-webpack-plugin remove vuetify styles?

I add purgecss-webpack-plugin to my vuetify application. The problem is purgecss-webpack-plugin remove all vuetify styles. This is how I config purgecss-webpack-plugin in vue.config.js: const PurgecssPlugin =…
Jon Sud
  • 10,211
  • 17
  • 76
  • 174
1
vote
1 answer

Custom extractor not working with Nuxt PurgeCSS

I'm working with Nuxt.js and using Nuxt-PurgeCSS: https://github.com/Developmint/nuxt-purgecss This project is using my own CSS similar to Tailwind (utility based) and I have a few classes that use the @ symbol. The default regex for this package…
Lovelock
  • 7,689
  • 19
  • 86
  • 186