Creating a Project

The easiest way to get started is to use one of the example templates

npx degit mattjennings/svelte-pixi/examples/vite
npm install
npm run dev

Adding to an Existing Project

If you have an existing project, you just need to install the following dependencies:

npm install pixi.js svelte-pixi

Vite / SvelteKit

If you’re using Vite or SvelteKit, you’ll need to add this to your Vite config:

// vite.config.js
const config = {
  /* ... */

  optimizeDeps: {
    include: ['pixi.js'],
  },
}