gigafibre-fsm/apps/dispatch/quasar.config.js
louispaulb 7da22ff132 merge: import dispatch-app into apps/dispatch/ (17 commits preserved)
Integrates the Dispatch PWA (Vue/Quasar) into the gigafibre-fsm monorepo.
Full git history accessible via `git log -- apps/dispatch/`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 08:08:51 -04:00

76 lines
2.0 KiB
JavaScript

/* eslint-env node */
const { configure } = require('quasar/wrappers')
module.exports = configure(function (ctx) {
return {
boot: ['pinia'],
css: ['app.scss'],
extras: ['roboto-font', 'material-icons'],
build: {
target: {
browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
node: 'node20',
},
vueRouterMode: 'hash',
// Base path = where the app is deployed under ERPNext
// Change this if you move the app to a different path
extendViteConf (viteConf) {
viteConf.base = process.env.DEPLOY_BASE || '/assets/dispatch-app/'
},
},
devServer: {
open: false,
// Listen on all interfaces so the container port is reachable from the host
host: '0.0.0.0',
port: 9000,
proxy: {
// Proxy ERPNext API calls to the frontend container
// host.docker.internal resolves to the Docker host on Mac / Windows
'/api': {
target: 'http://host.docker.internal:8080',
changeOrigin: true,
cookieDomainRewrite: 'localhost',
},
'/assets': {
target: 'http://host.docker.internal:8080',
changeOrigin: true,
},
},
},
framework: {
config: {},
// Only load what we actually use — add more as needed
plugins: ['Notify', 'Loading', 'LocalStorage'],
},
animations: [],
pwa: {
workboxMode: 'generateSW',
injectPwaMetaTags: true,
swFilename: 'sw.js',
manifestFilename: 'manifest.json',
useCredentialForManifestTag: false,
workboxOptions: {
skipWaiting: true,
clientsClaim: true,
},
extendManifestJson (json) {
json.name = 'Dispatch'
json.short_name = 'Dispatch'
json.description = 'Dispatch & Field Service'
json.display = 'standalone'
json.orientation = 'portrait'
json.background_color = '#ffffff'
json.theme_color = '#6366f1'
json.start_url = '.'
},
},
}
})