Snowpack 2.7

v2.7.0 release post
Published July 30, 2020 by Fred K. Schott

Happy release day! We are excited to announce Snowpack v2.7 with a handful of new features improving stability and the overall developer experience:


Plus, we hit some VERY exciting project milestones last month:


If you’ve been waiting for an excuse to give Snowpack a try, now is a great time to start! Try out a Create Snowpack App (CSA) template or install Snowpack into any existing project:

# install with npm
npm install --save-dev snowpack

# install with yarn
yarn add --dev snowpack

Redesigned Plugin API

Snowpack v2.7 features an major rewrite of our internal build pipeline to support a more reliable and expressive plugin API. New optimizations and file type builders are unlocked with the redesigned load(), transform(), run() and optimize() plugin hooks (with more on the way in future versions).

snowpack screenshot

Snowpack 2.7 is fully backwards compatible with older plugins, so you can upgrade Snowpack without worrying about version mismatches.

Every hook is documented in our new Plugins Guide for plugin authors. The new API is heavily inspired by Rollup, so we hope it already feels familiar to many of you.

Simplified Configuration

snowpack screenshot

Snowpack v2.0 originally introduced the concept of build "scripts" as a way to configure anything from file building to HTTP request proxying. Scripts were flexible, but hard to document and frustrating to debug.

Our internal plugin rewrite presented an opportunity to improve the developer experience while keeping the flexibility of direct CLI tooling. You can now connect third-party tooling directly into Snowpack’s build pipeline using one of two new utility plugins:

Other options like mount, proxy, and alias (see below) are now easier to customize as well with top-level config options that take the guesswork out of common configuration.

The "scripts" configuration format will continue to be supported in Snowpack v2, but we recommend migrating any custom scripts to "plugins" and plan to remove support in a future major release.

New: Import Aliasing

snowpack screenshot

In previous versions of Snowpack, import aliasing was hard to understand and configure (and it didn’t support all types of aliasing). Starting in Snowpack v2.7, Import Aliases gets a new top-level alias config so that you can define as many custom aliases as you’d like. Package import aliases are also supported.

Improved Build Performance

Snowpack’s official webpack plugin is now more powerful than ever, with new support for multi-page website bundling and better default performance settings (based on the latest research from Google). Special shout out to @mxmul (Yelp) for leading these community contributions!

If you don’t use a bundler in production, you’ll still see a smaller build. That’s because Snowpack v2.7 now ships with minification on by default. We plan to keep improving the default unbundled build performance story over the next few releases, so stay tuned.

Svelte + TypeScript Support

snowpack screenshot

Last week, Svelte announced official support for TypeScript. We’re huge fans of both projects and couldn’t pass up the chance to test the new support out in a brand new Svelte + TypeScript app template for Snowpack.

Visit Create Snowpack App for a list of all of our new app templates.

Thank You, Contributors!

Finally, Snowpack wouldn’t be possible without the 150+ contributors who contributed features, fixes, and documentation improvements. Thanks again for all of your help.

– Snowpack Maintainers

Psst... In case you missed it, check out our latest project: Skypack - the new JavaScript CDN that lets you load any npm package directly in the browser.
Follow @pikapkg on Twitter and don't miss future updates!