Skip to content

Version 2

Latest
Compare
Choose a tag to compare
@pearofducks pearofducks released this 04 Sep 11:45
· 14 commits to master since this release

Version 2 is a complete rewrite of this plugin, and thus comes with a few breaking changes where they couldn't be avoided.

The most noteworthy changes are:

  • Fastify is now used for the server instead of Koa. Koa's ecosystem has been fairly stagnant, and Fastify's plugin system can handle a wider variety of use cases.
  • The proxy option has changed, it now takes an array instead of an object. It's also far easier now to perform path rewrites.
    • v1: { '/v3/*': 'https://polyfill.io' }
    • v2: [{ from: '/v3/*', to: 'https://polyfill.io' }]
  • The spa option is now handled differently. This file must now reside inside of one of the dirs specified, and should be relative to the dir it resides in.
  • The silent option has changed - it now only allows for a boolean and when true the server will be fully silent.
  • The server will automatically resolve a fallback port if the port specified isn't available when starting.
  • The server will warn about starting/not starting differently; it will no longer warn when not starting, only when being forced to start in non-watch mode.
  • The plugin now includes types for the config options

Some of the major breaking changes are detected/warned about - this behavior will be removed in a future release is removed in 2.0.3.