/* 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: { dark: true, brand: { primary: '#6366f1', secondary: '#10b981', accent: '#f59e0b', dark: '#0d0f18', 'dark-page': '#0d0f18', positive: '#10b981', negative: '#ef4444', info: '#3b82f6', warning: '#f59e0b', }, }, plugins: ['Notify', 'Loading', 'LocalStorage', 'Dialog'], components: [ 'QTable', 'QTh', 'QTr', 'QTd', 'QCheckbox', 'QDialog', 'QCard', 'QCardSection', 'QCardActions', 'QDrawer', 'QMenu', 'QList', 'QItem', 'QItemSection', 'QItemLabel', 'QSplitter', 'QSeparator', 'QInput', 'QSelect', 'QBtn', 'QBtnGroup', 'QIcon', 'QBadge', 'QChip', 'QTooltip', 'QLinearProgress', 'QToolbar', 'QToolbarTitle', 'QSpace', 'QTab', 'QTabs', 'QTabPanels', 'QTabPanel', ], }, 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 = '.' }, }, } })