Use simpler CSS minify for runtime #381
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#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. syumai@cc24fcbFor 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: