
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
snowpack-plugin-optimize
Advanced tools
Optimize all of your assets for production with SourceMap support
Makes use of terser, csso, and html-minifier to provide minification of your JS, CSS, and HTML files respectively.
<link rel="modulepreload" />
tags to <head>
to speed up download of dependency tree.We're open to new kinds of optimizations, open an issue and lets talk!
npm i --save-dev snowpack-plugin-optimize
yarn add -d snowpack-plugin-optimize
// snowpack.config.js
module.exports = {
...config,
plugins: [
[
'snowpack-plugin-optimize',
// Entirely optional object. Showing default values
{
// Turn JS minification with Terser on/off
minifyJs?: true
// A deep merge is performed with these defaults.
// @see Terser configuration https://github.com/terser/terser#minify-options-structure
jsOptions?: {
module: true,
toplevel: true,
sourceMap: true,
nameCache,
compress: {
ecma: 2019,
},
format: {
ecma: 2019,
},
},
// Adds modulepreload links to potentially improve your module dependency load times
modulePreload?: true,
minifyCss?: true,
// A merge is performed with these default
// @see CSSO configuration https://github.com/css/csso#minifysource-options
cssOptions?: {
sourceMap: true,
filename: path.basename(file),
},
minifyHtml?: true,
// A merge is performed with these defaults
// @see html-minifier configuration https://github.com/kangax/html-minifier#options-quick-reference
htmlOptions?: {
collapseWhitespace: true,
keepClosingSlash: true,
removeComments: true,
},
}
]
]
}
FAQs
Optimize all of your assets for production with SourceMap support
The npm package snowpack-plugin-optimize receives a total of 12 weekly downloads. As such, snowpack-plugin-optimize popularity was classified as not popular.
We found that snowpack-plugin-optimize 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.