JSPM

  • Created
  • Published
  • Downloads 136
  • Score
    100M100P100Q73494F
  • License ISC

Extremely ⚡ Fast 🌀 Smart ⭕ HTML 🟠 JS ðŸŸĄ CSS ðŸ”ĩ SVG ðŸŸĢ Minification 💠

Package Exports

  • astro-min

Readme

astro-min

Extremely Fast and Smart Minification of 🟠 HTML ðŸŸĄ JS ðŸ”ĩ CSS ðŸŸĢ SVG Meticulously optimized for Speed ðŸĨ‡ and Effectiveness 🏅

astro npm version install size license: mit style: ts-standard

Feature Highlights âœĻ

  • 👟 fastest processing ~1000 files/s
  • ðŸŠķ lighter build output ~25% smaller
  • ðŸ“Ķ small packaged size ~30KB

Feature Roadmap ðŸŒą

  • HTML, CSS, JS, SVG

  • Files and inline Code

  • Static Site Minification

  • Support SSR / Hybrid Rendering

Getting started ðŸŽŊ

Use your package manager of your choice

# NPM
npm run astro add astro-min

# Bun
bun astro add astro-min

# PNPM
pnpm astro add astro-min

# Yarn
yarn astro add astro-min

Manual Installation 🧑‍ðŸ’ŧ

  1. Install package astro-min

  2. Import and add to integrations list

//astro.config.mjs
import { defineConfig } from 'astro/config'
import minify from 'astro-min'

export default defineConfig({
  integrations: [minify()]
})

Options 🔧

//astro.config.mjs
import { defineConfig } from 'astro/config'
import minify from 'astro-min'

export default defineConfig({
  integrations: [
    minify(
      do_not_minify_doctype: false,
      ensure_spec_compliant_unquoted_attribute_values: false,
      keep_closing_tags: false,
      keep_comments: false,
      keep_html_and_head_opening_tags: false,
      keep_input_type_text_attr: false,
      keep_spaces_between_attributes: false,
      keep_ssi_comments: false,
      minify_css: false,
      minify_js: false,
      preserve_brace_template_syntax: false,
      preserve_chevron_percent_template_syntax: false,
      remove_bangs: false,
      remove_processing_instructions: false,
    )
  ]
})

Development

Open in StackBlitz Open with CodeSandbox Open in GitHub Codespaces Open in Gitpod

Learn more 🔖

Colophon