
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Extremely β‘ fast and smart π HTML π‘ JS π΅ CSS π£ SVG minification for Astro π based on Rust π¦
Extremely fast and smartπΉ Minification of π HTML π‘ JS π΅ CSS π£ SVG
Meticulously optimized for Speed π₯ and Effectiveness π based on Rust π¦
Note
astro-min
focuses on compressing statically generated content and pre-rendered routes
Use your package manager of your choice
# NPM
npm run astro add astro-min
# Bun (known bug π)
#bun astro add astro-min
# PNPM
pnpm astro add astro-min
# Yarn
yarn astro add astro-min
Install package astro-min
Import and add to integrations list
//astro.config.mjs
import { defineConfig } from 'astro/config'
import min from 'astro-min'
export default defineConfig({
integrations: [min()]
})
//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,
})
]
})
[!IMPORTANT]
Use
astro-min
last in your integration list for the best optimization
Optional: but beforeastro-compressor
andastro-compress
for images only
//astro.config.mjs
import { defineConfig } from 'astro/config'
import compressor from 'astro-compressor'
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,
}),
compress({
CSS: false,
HTML: false,
Image: true,
JavaScript: false,
SVG: false
}),
compressor()
]
})
Build with modern FOSS π and AI assistance π€
Next generation β¨ web development based on Rust π¦
1.2.0 - π Feat: Parallel processing
- β¨ Feat: Skip *.min.*
1.1.0 - π Fix: Auto install bug
FAQs
Extremely β‘ fast and smart π HTML π‘ JS π΅ CSS π£ SVG minification for Astro π based on Rust π¦
The npm package astro-min receives a total of 179 weekly downloads. As such, astro-min popularity was classified as not popular.
We found that astro-min demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.Β It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.