- SvelteKit project with @sveltejs/adapter-static (runs fully static) - scripts/osm-data.mjs: pulls OSM data from Overpass API and converts to static GeoJSON under static/data/ with per-area manifest - Leaflet map frontend that loads the static data and renders features with popups and area selection dropdown - npm run build fetches data then produces a self-contained static site
19 lines
594 B
TypeScript
19 lines
594 B
TypeScript
import adapter from '@sveltejs/adapter-static';
|
|
import { sveltekit } from '@sveltejs/kit/vite';
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
sveltekit({
|
|
compilerOptions: {
|
|
// Force runes mode for the project, except for libraries. Can be removed in svelte 6.
|
|
runes: ({ filename }) =>
|
|
filename.split(/[\\/]/).includes('node_modules') ? undefined : true
|
|
},
|
|
// Static adapter: builds the app into static HTML/JS/CSS that can be
|
|
// served by any static HTTP server (nginx, python -m http.server, etc).
|
|
adapter: adapter()
|
|
})
|
|
]
|
|
});
|