Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/symind/import-svelte
- Owner: SyMind
- License: mit
- Created: 2023-01-18T11:08:39.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-23T11:20:22.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T07:40:59.633Z (28 days ago)
- Language: JavaScript
- Homepage:
- Size: 141 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)