This is a very simple demo of how to use Leaflet in SvelteKit with renderless components. The ideas behind this implementation are described in the video.
The project was bootstrapped with the SvelteKit CLI and Tailwind was added (optional).
Note that this is not a complete Leaflet implementation. Use it as inspiration or starting point to implement whatever you really need from Leaflet in your project!
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.