Registry /
devops / scully-plugin-minify-html
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
MinifyHtml
✓ import { MinifyHtml } from 'scully-plugin-minify-html';
✗ const MinifyHtml = require('scully-plugin-minify-html');
ESM only; CJS require fails. Plugin must be registered via Scully config.
getPluginOptions
✓ import { getPluginOptions } from 'scully-plugin-minify-html';
✗ const getPluginOptions = require('scully-plugin-minify-html').getPluginOptions;
Same ESM requirement.
type PostRender
✓ import type { PostRender } from '@scullyio/scully';
✗ import { PostRender } from 'scully-plugin-minify-html';
PostRender type is from Scully core, not this plugin.
Shows installation, registration of the plugin in Scully config, and optional customization of minifier options.
// Install: npm install --save-dev scully-plugin-minify-html
// Configure in scully.your-app.config.ts:
import { ScullyConfig } from '@scullyio/scully';
import { MinifyHtml } from 'scully-plugin-minify-html';
const defaultPostRenderers = ['MinifyHtml'];
export const config: ScullyConfig = {
projectRoot: './src',
projectName: 'your-app',
outDir: './dist/static',
defaultPostRenderers,
routes: {},
};
// Optional: customize minifier options
import { getPluginOptions } from 'scully-plugin-minify-html';
getPluginOptions().minifierOptions = {
collapseWhitespace: true,
removeComments: true,
minifyCSS: false,
};
Errors
Common errors & fixes
Cannot find module 'scully-plugin-minify-html'
Package not installed or ESM import used in CJS context
fixRun npm install --save-dev scully-plugin-minify-html or switch to ESM module system
Error: MinifyHtml is not a post-renderer
Plugin not added to defaultPostRenderers or postRenderers array in Scully config
fixAdd 'MinifyHtml' to defaultPostRenderers array in scully.config.ts
TypeError: getPluginOptions is not a function
getPluginOptions imported incorrectly (CommonJS) or wrong version
fixUse named import: import { getPluginOptions } from 'scully-plugin-minify-html'; Audit
Dependencies
@scullyio/scullyrequiredpeer dependency required for plugin infrastructure
json5requiredpeer dependency used for configuration parsing