split socketio strore into seperate stores added all routing points to sim add vuedraggable built icon picker for favorites and more
282 lines
9.5 KiB
TypeScript
282 lines
9.5 KiB
TypeScript
// Configuration for your app
|
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file
|
|
|
|
import { defineConfig } from '#q-app/wrappers';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
export default defineConfig((/* ctx */) => {
|
|
return {
|
|
// https://v2.quasar.dev/quasar-cli-vite/prefetch-feature
|
|
// preFetch: true,
|
|
|
|
// app boot file (/src/boot)
|
|
// --> boot files are part of "main.js"
|
|
// https://v2.quasar.dev/quasar-cli-vite/boot-files
|
|
boot: ['axios', 'socketio'],
|
|
|
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#css
|
|
css: ['app.scss'],
|
|
|
|
// https://github.com/quasarframework/quasar/tree/dev/extras
|
|
extras: [
|
|
// 'ionicons-v4',
|
|
'mdi-v7',
|
|
// 'fontawesome-v6',
|
|
// 'eva-icons',
|
|
// 'themify',
|
|
// 'line-awesome',
|
|
// 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both!
|
|
|
|
// 'roboto-font', // optional, you are not bound to it
|
|
// 'material-icons', // optional, you are not bound to it
|
|
],
|
|
|
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#build
|
|
build: {
|
|
alias: {
|
|
constants: fileURLToPath(new URL('./src/constants', import.meta.url)),
|
|
functions: fileURLToPath(new URL('./src/functions', import.meta.url)),
|
|
types: fileURLToPath(new URL('./src/types', import.meta.url)),
|
|
},
|
|
target: {
|
|
browser: ['es2022', 'firefox115', 'chrome115', 'safari14'],
|
|
node: 'node20',
|
|
},
|
|
|
|
typescript: {
|
|
strict: true,
|
|
vueShim: true,
|
|
// extendTsConfig (tsConfig) {}
|
|
},
|
|
|
|
vueRouterMode: 'history', // available values: 'hash', 'history'
|
|
// vueRouterBase,
|
|
// vueDevtools,
|
|
// vueOptionsAPI: false,
|
|
|
|
// rebuildCache: true, // rebuilds Vite/linter/etc cache on startup
|
|
|
|
// publicPath: '/',
|
|
// analyze: true,
|
|
// env: {},
|
|
// rawDefine: {}
|
|
// ignorePublicFolder: true,
|
|
// minify: false,
|
|
// polyfillModulePreload: true,
|
|
// distDir
|
|
|
|
// extendViteConf (viteConf) {},
|
|
// viteVuePluginOptions: {},
|
|
|
|
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,
|
|
},
|
|
allowedHosts: ['localhost', 'strixx.famor.org', 'simloc.strixx.intrepidnet.org'],
|
|
},
|
|
};
|
|
},
|
|
|
|
vitePlugins: [
|
|
[
|
|
'vite-plugin-checker',
|
|
{
|
|
vueTsc: true,
|
|
eslint: {
|
|
lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{ts,js,mjs,cjs,vue}"',
|
|
useFlatConfig: true,
|
|
},
|
|
overlay: false,
|
|
},
|
|
{ server: false },
|
|
],
|
|
],
|
|
},
|
|
|
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#devserver
|
|
devServer: {
|
|
// https: true,
|
|
open: false, // opens browser window automatically
|
|
// public: 'https://simloc.strixx.intrepidnet.org',
|
|
proxy: {
|
|
// proxy all requests starting with /api to jsonplaceholder
|
|
'/api': {
|
|
target: 'http://localhost:49151',
|
|
changeOrigin: true,
|
|
// rewrite: (path) => path.replace(/^\/api/, ''),
|
|
},
|
|
'/socket.io': {
|
|
target: 'http://localhost:49151', // Your backend WebSocket server
|
|
secure: false, // Set to true if using wss://
|
|
ws: true, // Enable WebSocket proxying
|
|
rewriteWsOrigin: true,
|
|
changeOrigin: true,
|
|
// rewrite: (path) => path.replace(/^\/socket.io/, ''),
|
|
},
|
|
'/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: {
|
|
dark: true,
|
|
},
|
|
// iconSet: 'material-icons', // Quasar icon set
|
|
iconSet: 'mdi-v7',
|
|
// lang: 'en-US', // Quasar language pack
|
|
|
|
// For special cases outside of where the auto-import strategy can have an impact
|
|
// (like functional components as one of the examples),
|
|
// you can manually specify Quasar components/directives to be available everywhere:
|
|
//
|
|
// components: [],
|
|
// directives: [],
|
|
|
|
// Quasar plugins
|
|
plugins: ['Dialog', 'Notify'],
|
|
},
|
|
// animations: 'all', // --- includes all animations
|
|
// https://v2.quasar.dev/options/animations
|
|
animations: ['slideInLeft', 'slideOutLeft', 'slideOutRight'],
|
|
|
|
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#sourcefiles
|
|
// sourceFiles: {
|
|
// rootComponent: 'src/App.vue',
|
|
// router: 'src/router/index',
|
|
// store: 'src/store/index',
|
|
// pwaRegisterServiceWorker: 'src-pwa/register-service-worker',
|
|
// pwaServiceWorker: 'src-pwa/custom-service-worker',
|
|
// pwaManifestFile: 'src-pwa/manifest.json',
|
|
// electronMain: 'src-electron/electron-main',
|
|
// electronPreload: 'src-electron/electron-preload'
|
|
// bexManifestFile: 'src-bex/manifest.json
|
|
// },
|
|
|
|
// https://v2.quasar.dev/quasar-cli-vite/developing-ssr/configuring-ssr
|
|
ssr: {
|
|
prodPort: 3000, // The default port that the production server should use
|
|
// (gets superseded if process.env.PORT is specified at runtime)
|
|
|
|
middlewares: [
|
|
'render', // keep this as last one
|
|
],
|
|
|
|
// extendPackageJson (json) {},
|
|
// extendSSRWebserverConf (esbuildConf) {},
|
|
|
|
// manualStoreSerialization: true,
|
|
// manualStoreSsrContextInjection: true,
|
|
// manualStoreHydration: true,
|
|
// manualPostHydrationTrigger: true,
|
|
|
|
pwa: false,
|
|
// pwaOfflineHtmlFilename: 'offline.html', // do NOT use index.html as name!
|
|
|
|
// pwaExtendGenerateSWOptions (cfg) {},
|
|
// pwaExtendInjectManifestOptions (cfg) {}
|
|
},
|
|
|
|
// https://v2.quasar.dev/quasar-cli-vite/developing-pwa/configuring-pwa
|
|
pwa: {
|
|
workboxMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
|
|
// swFilename: 'sw.js',
|
|
// manifestFilename: 'manifest.json',
|
|
// extendManifestJson (json) {},
|
|
// useCredentialsForManifestTag: true,
|
|
// injectPwaMetaTags: false,
|
|
// extendPWACustomSWConf (esbuildConf) {},
|
|
// extendGenerateSWOptions (cfg) {},
|
|
// extendInjectManifestOptions (cfg) {}
|
|
},
|
|
|
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-cordova-apps/configuring-cordova
|
|
cordova: {
|
|
// noIosLegacyBuildFlag: true, // uncomment only if you know what you are doing
|
|
},
|
|
|
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-capacitor-apps/configuring-capacitor
|
|
capacitor: {
|
|
hideSplashscreen: true,
|
|
},
|
|
|
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-electron-apps/configuring-electron
|
|
electron: {
|
|
// extendElectronMainConf (esbuildConf) {},
|
|
// extendElectronPreloadConf (esbuildConf) {},
|
|
|
|
// extendPackageJson (json) {},
|
|
|
|
// Electron preload scripts (if any) from /src-electron, WITHOUT file extension
|
|
preloadScripts: ['electron-preload'],
|
|
|
|
// specify the debugging port to use for the Electron app when running in development mode
|
|
inspectPort: 5858,
|
|
|
|
bundler: 'packager', // 'packager' or 'builder'
|
|
|
|
packager: {
|
|
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
|
|
// OS X / Mac App Store
|
|
// appBundleId: '',
|
|
// appCategoryType: '',
|
|
// osxSign: '',
|
|
// protocol: 'myapp://path',
|
|
// Windows only
|
|
// win32metadata: { ... }
|
|
},
|
|
|
|
builder: {
|
|
// https://www.electron.build/configuration
|
|
|
|
appId: 'map-sim-location',
|
|
},
|
|
},
|
|
|
|
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/developing-browser-extensions/configuring-bex
|
|
bex: {
|
|
// extendBexScriptsConf (esbuildConf) {},
|
|
// extendBexManifestJson (json) {},
|
|
|
|
/**
|
|
* The list of extra scripts (js/ts) not in your bex manifest that you want to
|
|
* compile and use in your browser extension. Maybe dynamic use them?
|
|
*
|
|
* Each entry in the list should be a relative filename to /src-bex/
|
|
*
|
|
* @example [ 'my-script.ts', 'sub-folder/my-other-script.js' ]
|
|
*/
|
|
extraScripts: [],
|
|
},
|
|
};
|
|
});
|