leaflet routimg machine - lical osr
This commit is contained in:
@@ -70,14 +70,30 @@ export default defineConfig((/* ctx */) => {
|
||||
|
||||
extendViteConf() {
|
||||
return {
|
||||
build: {
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules/leaflet')) return 'vendor-leaflet-core';
|
||||
if (id.includes('leaflet-routing-machine')) return 'vendor-leaflet-routing';
|
||||
if (id.includes('leaflet-geosearch')) return 'vendor-leaflet-geosearch';
|
||||
if (id.includes('leaflet-extra-markers')) return 'vendor-leaflet-markers';
|
||||
if (id.includes('openrouteservice-js')) return 'vendor-openrouteservice';
|
||||
if (id.includes('socket.io-client')) return 'vendor-socketio';
|
||||
if (id.includes('node_modules/quasar')) return 'vendor-quasar';
|
||||
if (id.includes('node_modules/vue') || id.includes('node_modules/pinia')) {
|
||||
return 'vendor-vue-core';
|
||||
}
|
||||
return undefined;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
server: {
|
||||
hmr: {
|
||||
// overlay: false,
|
||||
// overlay: false,
|
||||
},
|
||||
allowedHosts: [
|
||||
'localhost',
|
||||
'strixx.famor.org'
|
||||
],
|
||||
allowedHosts: ['localhost', 'strixx.famor.org', 'simloc.strixx.intrepidnet.org'],
|
||||
},
|
||||
};
|
||||
},
|
||||
@@ -102,7 +118,7 @@ export default defineConfig((/* ctx */) => {
|
||||
devServer: {
|
||||
// https: true,
|
||||
open: false, // opens browser window automatically
|
||||
// public: 'http://strixx.famor.org:9000',
|
||||
// public: 'https://simloc.strixx.intrepidnet.org',
|
||||
proxy: {
|
||||
// proxy all requests starting with /api to jsonplaceholder
|
||||
'/api': {
|
||||
@@ -118,9 +134,27 @@ export default defineConfig((/* ctx */) => {
|
||||
changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/socket.io/, ''),
|
||||
},
|
||||
'/osm': {
|
||||
target: 'https://nominatim.openstreetmap.org',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/osm/, ''),
|
||||
headers: {
|
||||
Referer: 'https://nominatim.openstreetmap.org/',
|
||||
'User-Agent': 'map-sim-location/0.0.1 (iam@williambr.uno)',
|
||||
},
|
||||
},
|
||||
'/ors': {
|
||||
// target: 'https://router.project-osrm.org',
|
||||
target: 'http://localhost:8080',
|
||||
changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/osrm/, ''),
|
||||
// headers: {
|
||||
// Referer: 'https://router.project-osrm.org/',
|
||||
// 'User-Agent': 'map-sim-location/0.0.1 (iam@williambr.uno)',
|
||||
// },
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#framework
|
||||
framework: {
|
||||
config: {
|
||||
|
||||
Reference in New Issue
Block a user