github FredKSchott/snowpack snowpack@2.13.1
Snowpack v2.13 - The Developer Experience Update

latest releases: snowpack@3.8.8, app-template-svelte-typescript@2.1.5, plugin-dotenv@2.2.0...
3 years ago

Note: v2.13.0 was skipped. v2.13.1 is the first official v2.13 release!

Introducing Snowpack v2.13 - The DX Update. This entire release focused on developer quality-of-life with new features to simplify config, update error logging, and remove all unnecessary friction from your dev environment. It's genuinely one of my favorite releases so far, so I hope you enjoy an even better dev experience with Snowpack.

-- @FredKSchott

Simplified CSA Templates + Fast Refresh Improvements

Screen Shot 2020-10-02 at 11 45 11 PM Screen Shot 2020-10-02 at 1 02 26 PM

All of our Create Snowpack App (CSA) templates have been improved this week, but the React & Preact templates got the biggest upgrades. They both sport a new design with a basic counter, perfect for testing that Fast Refresh is working (change the file, and see that the counter doesn't lose state). Behind the scenes, both Fast Refresh plugins have been updated to no longer require Babel externally, which means you can take advantage of our faster, built-in esbuild-powered pipeline.

  • 55bbc83 - add example usage of fast refresh to react/preact templates (#1188)
  • d69dbfe - refactor react-refresh plugin, babel user-dependency no longer needed (#1178)
  • 2f19fd0 - update to latest prefresh/snowpack plugin
  • 54fadca - CSA - move config back into templates, out of app-scripts-* packages (#1137)

Automatic "New Dependency" Handling

autonewpackage

Tired of having to use that dumb --reload flag? We were too! Snowpack now automatically re-installs dependencies when a new import is added. This feature keeps your work flowing with fewer unnecessary interruptions.

  • 7593243 - Re-implement dev dependency automatic handling (#1161)

Automatic CJS "namedExport" Detection

Node.js recently announced that they were attempting automatic CJS<>ESM named export interop. Not to be outdone, we announced that we'd do the same :) This feature means no more manual namedExport entries needed for most packages. Instead, Snowpack will attempt to automatically scan CJS packages for exports.

Snowpack uses the exact same internal lexer as Node.js to implement this, so expect to see the same results as Node.js v14 when you import a CJS npm package in ESM. However, this is a new idea that may still have some rough edges. If you see mixed results, remember that you can still use a manual "namedExports" config entry to use our more powerful runtime CJS detection.

Logging/Debugging Improvements

Snowpack v2.12 added our first ever Error Overlays. Snowpack v2.13 improves on that work with a full suite of improvements to logging, log formatting, and making sure that all reported errors contain relevant info. Our favorite subtle-but-great feature: Multiple "File Changed..." logs in a row are now counted and collapsed, giving you a cleaner dev console overall.

Better Sourcemap Support

No matter what I try to do to stop you, y'all keep improving our source map support! This release featured work by @pkaminski to add compose multiple source maps together, allowing for source maps in multi-step build pipelines. We have more improvements to add inside of Snowpack to really tighten this story up, but this is a huge step in the right direction 👍

Don't miss a new snowpack release

NewReleases is sending notifications on new releases.