v0.22.0

wasp-lang/waspv0.22.0Apr 1, 2026by github-actions[bot]

AI Summary

Focused on security updates, introduced lazy loading for routes, upgraded Zod validation library, and enabled async logic in the Wasp TS config file.

Key Highlights

  • Node.js requirement bumped for March 2026 security releases
  • Page routes lazy-loaded by default to reduce initial download size
  • Wasp TS config now supports async logic
  • Zod upgraded to v4
  • wasp.version field now accepts version ranges

Breaking Changes

  • Node.js requirement updated to >=v22.22.2
  • Zod v4 upgrade may require schema updates
  • HTML head tags in app.head must be valid React JSX
  • Page routes now lazy-loaded by default
  • REACT_APP_API_URL is now required in production builds

New Features

  • Async logic support in *.wasp.ts default export
  • wasp.new:ai accepts any model name string
  • wasp.version field accepts npm-compatible version ranges

Full Release Notes

### ⚠️ Breaking Changes

Remember to check out the [migration guide](https://wasp.sh/docs/migration-guides/migrate-from-0-21-to-0-22) for step-by-step documentation on how to upgrade.

- Wasp now requires Node.js version >=v22.22.2 (previously >=v22.12.0) due to the [March 2026 Node.js security releases](https://nodejs.org/en/blog/vulnerability/march-2026-security-releases). ([#3989](https://github.com/wasp-lang/wasp/pull/3989))
- In the `wasp build` output, the generated Docker image has been upgraded from Alpine 3.20 to Alpine 3.23. ([#3989](https://github.com/wasp-lang/wasp/pull/3989))
- Upgraded the Zod version used for env validation to Zod v4. If you use custom env validation schemas, you may need to update them to be compatible with the latest Zod API. ([#3879](https://github.com/wasp-lang/wasp/pull/3879))
- HTML head tags specified in `app.head` must now be valid React JSX. ([#3855](https://github.com/wasp-lang/wasp/pull/3855))
- Page routes are now loaded lazily by default. You can set `lazy: false` per-route to disable this behavior. ([#3891](https://github.com/wasp-lang/wasp/pull/3891))

### 🎉 New Features

- The Wasp TS config file (`*.wasp.ts`) now supports async logic in the default export, enabling use cases like file-based routing and dynamic configuration. ([#3900](https://github.com/wasp-lang/wasp/pull/3900))
- Wasp AI (`wasp new:ai`) now accepts any model name string, letting the OpenAI API validate it. The interactive CLI still offers curated GPT-5 options for convenience. ([#3904](https://github.com/wasp-lang/wasp/pull/3904))
- The `wasp.version` field now accepts any valid npm-compatible version range (e.g. `>=0.15.0 <0.22.0`, `~0.21.0`, `0.21.x`) instead of only `^x.y.z`. ([#3921](https://github.com/wasp-lang/wasp/pull/3921))
- Page routes are now lazy-loaded using React Router's `lazy` property, greatly reducing the initial download size for apps with many routes. ([#3891](https://github.com/wasp-lang/wasp/pull/3891))

### 🐞 Bug fixes

- `wasp deploy fly` now correctly computes Fly app basenames when the app name contains `-client` or `-server`. ([#3983](https://github.com/wasp-lang/wasp/pull/3983))
- Projects created with `wasp new` were missing their `.gitignore` file. ([#3870](https://github.com/wasp-lang/wasp/pull/3870))

### 🔧 Small improvements

- The `wasp-config` package is now installed from a local copy inside the project (`.wasp/wasp-config/`) instead of directly from the global Wasp data directory. This makes projects more self-contained and avoids issues with npm resolving paths outside the project. ([#3861](https://github.com/wasp-lang/wasp/pull/3861))
- `REACT_APP_API_URL` is now **required** when building the client for production (it no longer defaults to any value). In development mode, it still defaults to the local server URL. This prevents silently broken production deployments where the client can't reach the server. ([#3740](https://github.com/wasp-lang/wasp/pull/3740))
- The `wasp()` Vite plugin now enforces certain Vite config options that Wasp requires (e.g. `base`, `envPrefix`, `build.outDir`) and throws an error if the user tries to override them. ([#3771](https://github.com/wasp-lang/wasp/pull/3771))
- Upgraded our internal `nodemailer` dependency to v8.0.1 to address [a possible security issue](https://github.com/advisories/GHSA-rcmh-qjqh-p98v). ([#3756](https://github.com/wasp-lang/wasp/pull/3756))
- In the Vite config, removing the `server.open` field will no longer open the browser on `wasp start`. ([3831](https://github.com/wasp-lang/wasp/pull/3831))
- Wasp now validates that `vite.config.ts` (or `vite.config.js`) exists in your project at compile time, and warns if it's missing the `wasp` plugin import. ([#3863](https://github.com/wasp-lang/wasp/pull/3863))
- Wasp now prefixes env validation errors with the name of the field that failed the validation ([#3876](https://github.com/wasp-lang/wasp/pull/3876))
- Wasp now validates your `tsconfig.json` before analyzing the rest of the code. If something is off, you'll get a clear error message as soon as possible ([#3907](https://github.com/wasp-lang/wasp/issues/3907))
- Wasp now properly uses ANSI formatting in env validation errors ([#3877](https://github.com/wasp-lang/wasp/pull/3877))