npm snowpack 2.1.0

latest releases: 3.8.8, 3.8.7, 3.8.7-rc.0...
3 years ago

Directory Import Resolution - import './routes';

Previously, we'd done a very lazy + '.js' to any import missing a file extension, which broke if the import was a directory and users were expecting node-style directory resolution to the directory's index.js file.

Now, we first check if it's a directory, in which case we add a slightly less lazy + '/index.js' instead.

Faster, Better Import Scanning

Previously, we'd powered our install import scanner with esbuild, which caused any non-standard JS to fail if esbuild didn't support it, blocking users from using Snowpack entirely (err: Parse Error).

Now, we have a general fallback scanner for any non-JS syntax. This is now an entirely static analysis of your source directory, meaning we were able to remove esbuild entirely. It's very, very fast now.

True http-proxy Support

See: #375, #373, #371

Our "proxy" build script was naively just making http requests to the proxied destination. This work now uses a real proxy server implementation to support more requests, and sets the stage for us to introduce better proxy configuration support for all the http-proxy library options.

Fixes & Smaller Improvements

  • run scripts should go before mount scripts in build 9fb9f78
  • reinstall dependencies when node_modules dependencies change 0023e0b
  • improve rollup error handling 8488618
  • Fix the issue where CTRL+C is needed twice to exit (#380)

v2.0.3...v2.1.0

Don't miss a new snowpack release

NewReleases is sending notifications on new releases.