Closed notacouch closed 6 months ago
Hi!
This seems to be a limitation of PurgeCSS, as its CLI has the same issue. It attempts to require()
the config file even when used in an ESM context.
As a workaround, try changing the config file extension to .cjs
and specifying it explicitly:
eleventyConfig.addPlugin(purgeCssPlugin, {
config: "./purgecss.config.cjs"
});
I'm closing this, let me know if the suggestion didn't solve the issue :)
I appreciate your prompt response back in March. I haven't had the opportunity yet to test but will definitely keep you posted once I have.
Hello,
I am using 11ty 3 alpha5 with ESM (type: "module") mode enabled. Doesn't seem like this works with it even if the config file is in ESM: