svelte-micro-frontend Svelte Themes

Svelte Micro Frontend

Basic Svelte plus Vite configuration for micro frontend development.

Svelte Micro Frontend Boilerplate

Basic Svelte plus Vite configuration for micro frontend development.

Requirements

Installation

Download the source files (don’t clone since you want to create a “new” project).

Install dependencies with:

npm install

Usage

Start development server:

npm run dev

Build production files:

npm run build

Embed the micro frontend

Reference the output JS file inside the <head> before any <link rel="stylesheet">:

<script defer src="dist/svelte-micro-frontend.iife.js"></script>

Add the following inside the <body> where you want the micro frontend to appear:

<div id="svelte-micro-frontend"></div>

Top categories

Loading Svelte Themes