@poi/plugin-svelte

Svelte: The magical disappearing UI framework.

Installation

yarn add @poi/plugin-svelte --dev

How to use

Add this plugin to your config file:

📝 poi.config.js:




 



module.exports = {
  entry: './src/index.js',
  plugins: [
    require('@poi/plugin-svelte')(/* options */)
  ]
}

An example entry file:

📝 src/index.js:

import App from './App.html';

const app = new App({
  target: document.body,
  data: {
    name: 'world'
  }
});

📝 src/App.html:

<h1>Hello {name}!</h1>

<style>
  h1 {
    color: purple;
  }
</style>

API

options

options.loaderOptions

Options for svelte-loader.

WARNING

Override options with cautions!