Skip to content

Installation & Setup

Pedro Clerici edited this page Jul 26, 2025 · 1 revision

To get started with Thyseus, install the core library:

npm install thyseus

Transformer Setup

Note

The official Thyseus transformer is available as a (Vite-compatible) Rollup plugin. If you'd like support to be added for your bundler of choice, please file a ticket!

Thyseus makes use of a Typescript transformer to provide better DX. If you're not using the transformer, you'll need to review "Systems Without the Transformer." The transformer also requires Typescript; if you don't have experience with Typescript, it's recommended that you get familiar with the basics before starting with Thyseus.

Install...

npm install typescript @thyseus/rollup-plugin-thyseus

...and configure.

Rollup

import { defineConfig } from 'vite';
import { thyseusPlugin } from '@thyseus/rollup-plugin-thyseus';

export default defineConfig({
  plugins: [thyseusPlugin()],
});

Vite

import thyseusPlugin from 'thyseus-plugin';
import typescript from 'rollup-plugin-typescript2';

export default {
  // ...
  plugins: [
    thyseusPlugin(),
    typescript(),
  ],
};

Development vs. Production Builds

Thyseus uses esm-env to determine whether you're building your app for development or production. Dev builds have a number of additional correctness checks and validations that help you make sure your app works correctly and that thrown errors are easily debuggable. These checks come at the cost of speed, so for production builds these checks are stripped out. As long as you're using a modern bundler, this should happen automatically.

Clone this wiki locally