Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bun-plugin-svelte is not published #18070

Closed
kory-smith opened this issue Mar 11, 2025 · 2 comments
Closed

bun-plugin-svelte is not published #18070

kory-smith opened this issue Mar 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@kory-smith
Copy link
Contributor

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

import { SveltePlugin } from "bun-plugin-svelte";

// Use in Bun.build
Bun.build({
  entrypoints: ["./index.html"],
  outdir: "dist",
  target: "browser", // Also supports "bun" or "node" for server-side components
  plugins: [
    SveltePlugin({
      development: true, // Enable dev features, set to false for production
    }),
  ],
});

App.svelte

<script lang="ts">
  let name: string = "Bun";
  let count = $state(0);
</script>

<main class="app">
  <h1>Cookin up apps with {name}</h1>
</main>

index.ts

// index.ts
import { mount, unmount } from "svelte";
import App from "./App.svelte";

const root = document.getElementById("root")!;
const app = mount(App, { target: root });

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:

  1. The documentation is updated to point to a package that Bun actually owns, or
  2. The bun-plugin-svelte pack package is taken over by Bun in npm
@kory-smith kory-smith added bug Something isn't working needs triage labels Mar 11, 2025
@Electroid
Copy link
Contributor

We're fixing this, we forgot to publish it.

@Electroid Electroid changed the title bun-plugin-svelte isn't Bun's official Svelte plugin. It's owned by somebody else bun-plugin-svelte is not published Mar 11, 2025
@DonIsaac
Copy link
Contributor

Its published now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants