package
Official Svelte plugin for Bun
npm install bun-plugin-svelteGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Estimated unpacked size across 1 packages.
14.8 kB
Includes dependencies.
donisaac
don@donisaac.dev
bun-plugin-svelteThe official Svelte plugin for Bun.
$ bun add -D bun-plugin-sveltebun-plugin-svelte integrates with Bun's Fullstack Dev Server, giving you
HMR when developing your Svelte app.
Start by registering it in your bunfig.toml:
[serve.static]
plugins = ["bun-plugin-svelte"]Then start your dev server:
$ bun index.htmlSee the example for a complete example.
bun-plugin-svelte lets you bundle Svelte components with Bun.build.
// build.ts
// to use: bun run build.ts
import { SveltePlugin } from "bun-plugin-svelte"; // NOTE: not published to npm yet
Bun.build({
entrypoints: ["src/index.ts"],
outdir: "dist",
target: "browser",
sourcemap: true, // sourcemaps not yet supported
plugins: [
SveltePlugin({
development: true, // turn off for prod builds. Defaults to false
}),
],
});bun-plugin-svelte does not yet support server-side imports (e.g. for SSR).
This will be added in the near future.
Support for these features will be added in the near future
<style> blocks--erasableSyntaxOnly