Building Eventcatalog
By default, EventCatalog exports a static HTML site. This means you can deploy your application anywhere you want.
Some users have large catalogs, and slow deployments. This is because the static mode builds the entire catalog into HTML files.
If you have a large catalog you may want to use SSR mode, this will give you a server-side rendered application. This reduces build times, and renders pages on the fly.
Building your EventCatalog (Static)​
To build your Catalog you will need to run:
npm run build
This will output one directory
dist
- Your EventCatalog as Static HTML
Passing custom options​
eventcatalog@2.16.5
EventCatalog uses Astro to build the application. You can pass custom options to the build command by using the --
prefix.
npx eventcatalog dev --debug -- --env=production --port=3000
Memory limits​
If you get any JavaScript heap out of memory
errors, you can increase the memory limit by setting the NODE_OPTIONS
environment variable. This gives astro more memory to work with.
NODE_OPTIONS=--max_old_space_size=8196 npm run build
If you are still experiencing issues, you can try:
- Turning off HTML compression (see documentation)
- Turning on MDX optimization (see documentation)
- Rendering EventCatalog in SSR mode.
- This requires you to run your EventCatalog on a server. But your pages are rendered on the fly, so you don't need to build the entire catalog into HTML files. This can also save you a lot of time when deploying your catalog.