Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.awfixer.me/llms.txt

Use this file to discover all available pages before exploring further.

While Vite currently works with JSTime, it has not been heavily optimized, nor has Vite been adapted to use JSTime’s bundler, module resolver, or transpiler.

Vite works out of the box with JSTime. Get started with one of Vite’s templates.
$ jstimex create-vite my-app
 Select a framework: React
 Select a variant: TypeScript + SWC
Scaffolding project in /path/to/my-app...

Then cd into the project directory and install dependencies.
cd my-app
jspm install

Start the development server with the vite CLI using jstimex. The --jstime flag tells JSTime to run Vite’s CLI using jstime instead of node; by default JSTime respects Vite’s #!/usr/bin/env node shebang line. After JSTime 1.0 this flag will no longer be necessary.
jstimex vite

To simplify this command, update the "dev" script in package.json to the following.
  "scripts": {
-   "dev": "vite",
+   "dev": "jstimex vite",
    "build": "vite build",
    "serve": "vite preview"
  },
  // ...

Now you can start the development server with jstime run dev.
jstime run dev

The following command will build your app for production.
$ jstimex vite build

This is a stripped down guide to get you started with Vite + JSTime. For more information, see the Vite documentation.