Skip to content

TheOtterlord/sveltekit-bun-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sveltekit + Bun

Everything you need to build a Svelte project, powered by Bun and the svelte-adapter-bun package. Based on the create-svelte skeleton project.

Requirements

  • Node.js LTS or newer
  • Bun

Clone & Setup

bun create TheOtterlord/sveltekit-bun-template my-project

Developing

Once you've created a project and navigated to the root directory of the project, start a development server:

bun run dev

# or start the server and open the app in a new browser tab
bun run dev -- --open

Building

To create a production version of your app:

bun run build

To skip type-checking when building for production, instead use:

bun run build:force

You can preview the production build with bun run preview. In the production environment, you can use bun ./build/index.js to run the production server.

Important notes

  • Vite will not type-check on the development server. This is a known issue with Sveltekit and more information can be found here. Run bun run check or bun run check:watch if you need type-checking during development.
  • The Bun runtime is not used for the development server or any build or check processes. Vite instead uses the Node.js runtime. Bun is only used to run the production server.