import-svelte Svelte Themes

Import Svelte

Require and transpile Svelte on the fly

Import Svelte

Require and transpile Svelte on the fly.

Install

npm install import-svelte

Usage

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

Top categories

Loading Svelte Themes