Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/symind/import-svelte

Require and transpile Svelte on the fly
https://github.com/symind/import-svelte

Last synced: 26 days ago
JSON representation

Require and transpile Svelte on the fly

Awesome Lists containing this project

README

        

Import Svelte

Require and transpile Svelte on the fly.

# Install

```bash
npm install import-svelte
```

# Usage

```js
const importSvelte = require('import-svelte');

const modulePath = path.resolve(__dirname, './App.svelte')
const App = importSvelte(modulePath)
const inst = new App({
target: document.body // use domjs
})
```

# License

[MIT](./LICENSE)