/* eslint-env node */ const { configure } = require('quasar/wrappers') module.exports = configure(function () { return { boot: ['pinia'], css: ['app.scss'], extras: ['material-icons'], build: { target: { browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'], node: 'node20', }, vueRouterMode: 'hash', extendViteConf (viteConf) { viteConf.base = process.env.DEPLOY_BASE || '/field/' }, }, devServer: { open: false, host: '0.0.0.0', port: 9002, proxy: { '/api': { target: 'https://erp.gigafibre.ca', changeOrigin: true, }, }, }, framework: { config: { notify: { position: 'top', timeout: 2500 }, }, plugins: ['Notify', 'Loading', 'LocalStorage', 'Dialog', 'BottomSheet'], }, animations: [], pwa: { workboxMode: 'generateSW', injectPwaMetaTags: true, swFilename: 'sw.js', manifestFilename: 'manifest.json', useCredentialForManifestTag: false, workboxOptions: { skipWaiting: true, clientsClaim: true, cleanupOutdatedCaches: true, navigateFallback: 'index.html', navigateFallbackDenylist: [/^\/api\//], runtimeCaching: [ { // Cache ERPNext API responses for offline urlPattern: /\/api\/resource\//, handler: 'NetworkFirst', options: { cacheName: 'erp-api', expiration: { maxEntries: 200, maxAgeSeconds: 86400 }, networkTimeoutSeconds: 5, }, }, ], }, extendManifestJson (json) { json.name = 'Targo Field' json.short_name = 'Field' json.description = 'Targo Field Technician App' json.display = 'standalone' json.orientation = 'portrait' json.background_color = '#ffffff' json.theme_color = '#0f172a' json.start_url = '.' }, }, } })