Skip to content

Releases: denchiklut/ssr-boilerplate

v4.0.0

12 Oct 18:22
Compare
Choose a tag to compare

What's Changed

Breaking changes

  • Since React code runs in two environments (client & server), it's easy to accidentally expose secrets to the client bundle. With this change, we have split environment variables into two main types: those that can be safely exposed to the client (prefixed with CLIENT_ - u can change prefix in webpack/plugins/define.plugin.ts ) and those that are strictly for server use.

    On the client, only variables that start with the CLIENT_ prefix will be available, while on the server, all environment variables are accessible. Additionally, getENV will throw an error if an attempt is made to access server-specific environment variables in the client, ensuring that sensitive data remains secure.

    Important note! Unlike with Next.js apps, environment variables in this setup are not baked into the bundle at build time. This allows you to build the app once (e.g., for staging) and reuse the same build in other environments, such as production, without needing to rebuild for each environment.

  • The logger has been updated to work seamlessly across both server and client environments. On the server, it now uses the Winston logger, while on the client, it falls back to the browser's console, ensuring consistent logging behavior regardless of the environment.

  • Also added the React Forget Babel plugin, which is an experimental feature designed for React 19 (which has not yet been released). Since this is experimental, users can easily opt out of using it by removing the plugin from the .babelrc configuration file if they encounter any issues or prefer not to use it at this time.

Full Changelog: v2.1.1...v4.0.0

SSR with React Suspense Api

22 Jan 17:07
Compare
Choose a tag to compare

Added examples with renderToPipeableStream api

v2.1.1

27 Aug 02:33
Compare
Choose a tag to compare
  • fixed webpack validation error
  • update npm dependencies

v2.1.0

05 Mar 12:07
Compare
Choose a tag to compare
  • setup PWA
  • setup env utils
  • setup debug util

v2.0.0

29 Dec 17:27
Compare
Choose a tag to compare
  • fixed favicon issue
  • setup webpack-dev-middleware
  • update npm-run-all cli
  • fix SPA warnings
  • setup polifils