Next.js Demo

This demo shows how to integrate yFiles in a Next.js application with TypeScript.

To start the demo

  1. Go to the demo's directory demos-ts/toolkit/next
  2. Run npm install
  3. Run npm run dev

This will start the development server of the toolkit.

The integrated development server of the project will automatically update the application upon code changes.

Deploying Next.js with yFiles

There are no special caveats that you need to look out for when you load yFiles as NPM dependency as in this demo application. However, we recommend to include the @yworks/optimizer when you deploy your app for production.

The optimizer will obfuscate the public API of the yFiles module files, as well as yFiles API usages in application sources.

We highly recommend obfuscating the yFiles for HTML library prior to deploying your application to a public web server to reduce the download size of the library for the end user. Note that, at the time of writing, you are not required to use obfuscation.