Basic Svelte plus Vite configuration for micro frontend development.
Download the source files (don’t clone since you want to create a “new” project).
Install dependencies with:
npm install
Start development server:
npm run dev
Build production files:
npm run build
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>