/* 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 = '/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 = '.' }, }, } })