A collection of esbuild plugins for compiling Svelte 5 components (with TypeScript and SCSS support), SCSS styles to CSS, SSR stubbing, raw file imports (?raw suffix), and component meta extraction (?meta suffix). Version 1.4.0. It is actively maintained, ships TypeScript types, and works with esbuild >=0.17.0 and Svelte ^5.0.0. Key differentiators: Svelte 5 Runes support, built-in template engine for SSR, and modular imports.
npm install esbuild-loader-svelteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows full setup with all core plugins: Svelte compilation, SCSS, raw imports, and meta extraction.
Upgrade Svelte to version 5 or use an older version of this package (none exist).
Use main entry for CJS: const { sveltePlugin } = require('esbuild-loader-svelte');If you want to see a11y warnings, pass filterWarnings: () => false.
Install sass: npm install sass --save-dev
npm install sass --save-dev
import { sveltePlugin } from 'esbuild-loader-svelte'Ensure import path is 'esbuild-loader-svelte/raw' (lowercase, no extension).