Error running on Win 10
Describe the bug
Having some difficulty with purgecss. I am running Win10 with the following infrastructure:
node (v18.20.4)
npm (10.7.0)
purgecss (6.0.0)
my purgecss.config.js looks like this:
const purgecssFromHtml = require('purgecss-from-html');
module.exports = {
content: ['./index.html'],
css: ['./src/css/empty.css'],
extractors: [
{
extractor: purgecssFromHtml,
extensions: ['html'],
},
],
output: './output',
};
my project is organized like this:
project-directory/
│
├── index.html
├── purgecss.config.js
├── src/
│ └── css/
│ └── empty.css
└── output/
All CSS is inline for index.html empty.css is empty
this command
npx purgecss --config ./purgecss.config.js
does not generate a file in the output directory
these terminal commands also fail:
npx purgecss --content ./index.html --css ./src/css/empty.css --output ./output
npx purgecss --content ./index.html --output ./output
what am I doing wrong?
Thanks for assistance here.
To Reproduce
steps
Expected Behavior
expected behavior
Environment
Win 10 node (v18.20.4) npm (10.7.0) purgecss (6.0.0)
Add any other context about the problem here
context
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Update.
have successfully run this terminal command
npx purgecss --content ./index.html --css ./src/css/styles.css --output ./output
however, had to change ./output directory structure to match ./src directory structure
using new directory structure, this command now works:
npx purgecss --config ./purgecss.config.js
with this argument: output: './output',
not an argument that follows the ./src directory structure
however, HTML inline CSS process still fails
but fall back to moving inline to an external file works, so will follow that process in the future
Yes, PurgeCSS will not purged the inline CSS from an HTML out of the box.