Skip to content

v3.0.0

Compare
Choose a tag to compare
@75lb 75lb released this 10 Jun 07:38
· 64 commits to master since this release

Breaking changes since v2.6.1

New features

  • --static.extensions. #120, docs
  • --spa.asset-test-fs lwsjs/spa#1, docs
  • --rewrite now works behind an HTTP proxy. #114
  • configFile is now honoured when using programmatic API. #115
  • Lots of new API and wiki documentation written with more to come.

Other fixes

  • Middleware stack plugin loading now works correctly with Node v12.
  • Upgraded and optimised dependency tree.

Upgrade notes

Some tips on upgrading from v2 to v3.

  • If you use --rewrite and have an asterix wildcard in your from expression (e.g. /api/*) you'll need to change the asterix to (.*), e.g. /api/(.*).
  • To upgrade your middleware plugin, check the new API docs. The only difference is that the exported plugin is now a plain class, not a decorator function as before.
  • The main difference with the new programmatic API is that you now launch a server with LocalWebServer.create rather than localWebServer.listen as before.
  • If you use lws-mock-responses, you'll need to install the plugin into your project then include it in a custom stack - example below.
    npm i --save-dev lws-mock-responses
    ws --stack mock-responses static index
    

If you have any questions, post an issue - thanks.