You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using PurgeCSS 7.x (ESM) on Windows, running purgecss --config some-path\purgecss.config.js throws an error about "Only URLs with a scheme in: file, data, and node are supported by the default ESM loader".
Specifically, Node sees D: as a custom protocol, which PurgeCSS doesn't handle, resulting in Received protocol 'd:'.
Describe the bug
When using PurgeCSS 7.x (ESM) on Windows, running purgecss
--config some-path\purgecss.config.js
throws an error about "Only URLs with a scheme in: file, data, and node are supported by the default ESM loader".Specifically, Node sees D: as a custom protocol, which PurgeCSS doesn't handle, resulting in Received protocol 'd:'.
To Reproduce
Place a
purgecss.config.js
inD:\projects\my-site\
.Attempt:
purgecss --config .\purgecss.config.js
Expected Behavior
PurgeCSS should load the config file without error, just as in older versions.
What I've Tried
All approaches result in the same error on Windows. The only workaround is to downgrade to PurgeCSS 4.1.3 (pre-ESM).
Environment
Add any other context about the problem here
Workarounds
Downgrade to PurgeCSS 4.1.3
A fix in PurgeCSS’s CLI to handle Windows drive letters would help.
Code of Conduct
The text was updated successfully, but these errors were encountered: