@vulppi/bun-svelte-loader
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Vulppi Bun Svelte Loader

Overview

@vulppi/bun-svelte-loader is a plugin for the Bun JavaScript runtime that enables seamless loading and compilation of Svelte components. With this plugin, you can easily integrate Svelte into your Bun projects.

Installation

Install the plugin:

bun install @vulppi/bun-svelte-loader

Usage

To use the plugin, add it to your bunfig.toml configuration file:

[serve.static]
plugins=["@vulppi/bun-svelte-loader"]

Once configured, you can import and use Svelte components in your project:

//app.ts
import App from './App.svelte'

const app = new App({
  target: document.body,
  props: {
    name: 'World',
  },
})

export default app
<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Svelte App</title>
  </head>
  <body>
    <script type="module" src="./app.ts"></script>
  </body>
</html>

Features

  • Automatic compilation of .svelte files.
  • Seamless integration with Bun's plugin system.
  • Optimized for performance.

Contributing

Contributions are welcome! Feel free to open issues or submit pull requests to improve the plugin.

Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.

Package Sidebar

Install

npm i @vulppi/bun-svelte-loader

Weekly Downloads

30

Version

0.0.4

License

MIT

Unpacked Size

46.9 kB

Total Files

5

Last publish

Collaborators

  • morbden