Installation | svelte-wordcloud Skip to content

Installation

Terminal window
npm install @shamokit/svelte-wordcloud three @threlte/core @threlte/extras
Terminal window
pnpm add @shamokit/svelte-wordcloud three @threlte/core @threlte/extras
PackageVersion
svelte^5.0.0
three>=0.160.0
@threlte/core^8.0.0
@threlte/extras^9.0.0

troika-three-text uses a web worker internally. Add it to optimizeDeps so Vite pre-bundles it correctly:

vite.config.ts
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [sveltekit()],
optimizeDeps: {
include: ['troika-three-text'],
},
});