314 has been pointed out that CSS minifier plugins are depending on the limited context (Node.js). I've been resolved by prebundling critical plugins in #315, but we still received that Marp Core is still incompatible in some JavaScript environments such as Cloudflare Workers, because the prebundled script is still depending on path and utils.
For getting rid off Node.js dependency in minifyCSS feature, this PR will replace PostCSS plugin for minify from cssnano plugins into simpler plugin @csstools/postcss-minify. That makes no longer depended on Node.js packages, and no longer required complex prebundling settings. 🙌
Instead, cssMinify will no longer apply minification to CSS selectors and declarations. That is major change, but we do not think that is having major impact because this plugin has consistent gurantees:
It guarantees two things :
browsers can not tell the difference between the original and the minified CSS
lawyers can not tell the difference between the original and the minified CSS
314 has been pointed out that CSS minifier plugins are depending on the limited context (Node.js). I've been resolved by prebundling critical plugins in #315, but we still received that Marp Core is still incompatible in some JavaScript environments such as Cloudflare Workers, because the prebundled script is still depending on
path
andutils
.An community fork
@syumai/marp-core
for making compatible Marp Core with Cloudflare Workers is actually removing CSS minification. https://github.com/syumai/marp-core/pull/1/commits/cc24fcb211ac7e98db5dd815ba0ebcba6271c3e9For getting rid off Node.js dependency in
minifyCSS
feature, this PR will replace PostCSS plugin for minify from cssnano plugins into simpler plugin@csstools/postcss-minify
. That makes no longer depended on Node.js packages, and no longer required complex prebundling settings. 🙌Instead,
cssMinify
will no longer apply minification to CSS selectors and declarations. That is major change, but we do not think that is having major impact because this plugin has consistent gurantees: