You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{SveltePlugin}from"bun-plugin-svelte";// Use in Bun.buildBun.build({entrypoints: ["./index.html"],outdir: "dist",target: "browser",// Also supports "bun" or "node" for server-side componentsplugins: [SveltePlugin({development: true,// Enable dev features, set to false for production}),],});
App.svelte
<scriptlang="ts">
let name:string="Bun";let count =$state(0);
</script>
<mainclass="app">
<h1>Cookin up apps with {name}</h1>
</main>
bun build.ts should successfully build with no errors.
What do you see instead?
(function (entry, fetcher) ^ SyntaxError: Export named 'SveltePlugin' not found in module '/private/tmp/svelte/node_modules/bun-plugin-svelte/index.js'.
(obviously this is because the bun-plugin-svelte in the blog and the one that are downloaded from NPM are different)
Additional information
The bun-plugin-svelte package isn't published to npm. Trying to run the example from the blog results in an error. Since the blog touts the svelte plugin as existing, I consider this a bug. The bug will be fixed when either:
The documentation is updated to point to a package that Bun actually owns, or
The bun-plugin-svelte pack package is taken over by Bun in npm
The text was updated successfully, but these errors were encountered:
Electroid
changed the title
bun-plugin-svelte isn't Bun's official Svelte plugin. It's owned by somebody elsebun-plugin-svelte is not published
Mar 11, 2025
What version of Bun is running?
1.2.5+013fdddc6
What platform is your computer?
Darwin 24.3.0 arm64 arm
What steps can reproduce the bug?
build.ts
App.svelte
index.ts
What is the expected behavior?
bun build.ts
should successfully build with no errors.What do you see instead?
(function (entry, fetcher) ^ SyntaxError: Export named 'SveltePlugin' not found in module '/private/tmp/svelte/node_modules/bun-plugin-svelte/index.js'.
(obviously this is because the bun-plugin-svelte in the blog and the one that are downloaded from NPM are different)
Additional information
The
bun-plugin-svelte
package isn't published to npm. Trying to run the example from the blog results in an error. Since the blog touts the svelte plugin as existing, I consider this a bug. The bug will be fixed when either:bun-plugin-svelte
pack package is taken over by Bun in npmThe text was updated successfully, but these errors were encountered: