Serve map app at /map/, instead of manually enabling

This commit is contained in:
Adam Goldsmith 2024-06-26 13:15:41 -04:00
parent 1571086844
commit e9c2cd9e95
4 changed files with 32 additions and 5 deletions

12
map/index.html Normal file
View File

@ -0,0 +1,12 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>APRS Map</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/map.js"></script>
</body>
</html>

View File

@ -1,12 +1,7 @@
import * as Vue from 'vue';
// import OpenLayersMap from 'vue3-openlayers';
// import 'vue3-openlayers/dist/vue3-openlayers.css';
import StatusScreen from './StatusScreen.vue';
// import Map from './Map.vue';
const app = Vue.createApp(StatusScreen);
// app.use(OpenLayersMap);
app.mount('#app');

11
src/map.js Normal file
View File

@ -0,0 +1,11 @@
import * as Vue from 'vue';
import OpenLayersMap from 'vue3-openlayers';
import 'vue3-openlayers/dist/vue3-openlayers.css';
import Map from './Map.vue';
const app = Vue.createApp(Map);
app.use(OpenLayersMap);
app.mount('#app');

View File

@ -1,3 +1,4 @@
import { resolve } from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import yaml from '@rollup/plugin-yaml';
@ -6,4 +7,12 @@ import yaml from '@rollup/plugin-yaml';
export default defineConfig({
assetsInclude: ['**/*.gpx'],
plugins: [vue(), yaml()],
build: {
rollupOptions: {
input: {
main: resolve(__dirname, 'index.html'),
map: resolve(__dirname, 'map/index.html'),
},
},
},
});