Questions tagged [purifycss]
18 questions
23
votes
2 answers
Remove unused css with React and Webpack
I'm trying to remove unused css classes from my app using purify-css for WebPack.
To build this project I'm usin React, scss, WebPack and PostCss to build and compile everything.
So far I was able to have progress, but there is something wrong and I…

celsomtrindade
- 4,501
- 18
- 61
- 116
5
votes
1 answer
How to Use PurifyCSS in Laravel Mix?
I want to use PurifyCSS in Laravel but I can't get it to work.
Stack
Laravel: 5.5.4
NPM: 6.0.0
Node.js: 8.10
Code
mix.styles([
'resources/assets/css/panel/a.css',
'resources/assets/css/panel/b.css',
…

MohNj
- 506
- 1
- 6
- 18
4
votes
2 answers
Angular Service Worker - hash mismatch after PurifyCSS on dist/styles.*.css
When I build an Angular application with a service worker, it creates a hash table with the hash of each file to detect when a new version of the app is available. This hash table is in ngsw.json.
Here is an example of the hash valueas.
If I want…

Mr. Mars
- 762
- 1
- 9
- 39
2
votes
1 answer
Use purifycss with Angular 4
I'm trying to use Angular with PurifyCss (using webpack) but so far, no success on the process... I'm trying this on the dev environment, basically what I did was:
Create new project using AngularCli ng new my-project
Eject the webpack config ng…

celsomtrindade
- 4,501
- 18
- 61
- 116
1
vote
0 answers
how excatly to use PurifyCSS Online tool with blogger?
PurifyCSS Online removes unused CSS. I have an URL in my template (http://fonts.googleapis.com/earlyaccess/droidarabickufi.css). After PurifyCSS removed unused CSS it gave me the following code:
en@font-face{font-family:'Droid Arabic…

Ezzeddin Aykal
- 39
- 2
- 5
1
vote
0 answers
How to remove unused CSS using Webpack 4 with mini-css-extract-plugin?
I was trying to delete unused CSS using Webpack 4.41.5 . I've found that the best for this would be to use PurifyCSS Plugin, but it should run with extract-text-webpack-plugin which is deprecated in WP4^. Can anyone recommend a plugin which will run…

chimek0
- 11
- 3
1
vote
0 answers
Can the PurifyCss plugin be forced to wait until the bundle is ready?
My first "Hello Webpack" project was going great until I started integrating purifycss-webpack. If I delete my /dist folder manually and then build, this config works. But if the /dist folder exists and CleanWebpackPlugin deletes it as its designed…

Geek Stocks
- 2,010
- 3
- 27
- 43
1
vote
1 answer
How to stop Webpack-3's PurifyCSSPlugin from cleaning to much?
Problem
Everything else equal, my final pages differ in their CSS result. The prod version lacks the proper flexbox alignment as seen in the following comparison:
Dev
Prod
The problem is caused by the PurifyCSSPlugin. I don't know how to configure…

lony
- 6,733
- 11
- 60
- 92
0
votes
1 answer
Reducing CSS in Webpack project
Looking for the best way to eliminate redundant CSS code in my Webpack project ie. I'm importing a local Bootstrap css file in the src folder, but use very little of it.
vendor.scss:
@import "./css/bootstrap.min.css";
vendor.js:
import…

seixwebdev
- 111
- 2
- 4
- 14
0
votes
0 answers
PurifyCSS removes necessary selector
I have a webpack bundled react app and am trying to slim down its css that's extracted using PurifyCSS library. However, I'm not having much success with running the PurifyCSS CLI as it appears to be removing too much css.
For example, it's removing…

MarksCode
- 8,074
- 15
- 64
- 133
0
votes
2 answers
laravel-mix purifyCss option not working
im looking to use the purifyCss of laravel-mix. The fuction is working fine on a brand new installation but when i try to upgrade from an older version of laravel-mix nothing happens and no errors are shown.
this is the currect package.json file
{
…

SpyrosJevan
- 70
- 1
- 9
0
votes
0 answers
webpack: PurfiyCSSPlugin does not include styles referenced by bundle.js
I try to use webpacks PurifyCSSPlugin. My config looks like this
new PurifyCSSPlugin({
paths: glob.sync([
path.join(env.outputDirectory, './*.html'),
path.join(env.outputDirectory, './**/*.js'),
path.join(__dirname,…

RasPelikan
- 33
- 5
0
votes
1 answer
how to execute nodejs programs in php
I am working on project that uses purify-css
https://github.com/purifycss/purifycss
in which I have installed purify-css on the server with npm, now I want to execute the command shown below through PHP and I am using exec() method.
purifycss…

mohitesachin217
- 451
- 5
- 14
0
votes
3 answers
Purifying css assets via laravel mix doesnt work
Description:
Purifying option doesnt work while compiling css files.Can you explain what is wrong with this approach?
Steps To Reproduce:
This is inside my mix file:
mix.style('resources/assets/css/some.css', 'public/css/some.css').options({
…

Jan Ciołek
- 1,796
- 3
- 17
- 32
0
votes
1 answer
Error with purify-webpack plugin when using HtmlWebpackPlugin
I am using the purifycss-webpack plugin in order to remove unused css from my webpack build. A little context, our app is split into chunks based on the route using System.import. Also, I generate the built html using HtmlWebpackPlugin using an .ejs…

vamsiampolu
- 6,328
- 19
- 82
- 183