/* eslint-env node */

// Configuration for your app
// https://v2.quasar.dev/quasar-cli-vite/quasar-config-js

import { configure } from 'quasar/wrappers';
import { fileURLToPath } from 'node:url';

export default configure((ctx) => {
  return {
    eslint: {
      fix: true,
      warnings: true,
      errors: true,
    },
    boot: ['i18n', 'axios', 'components'],
    css: ['app.scss'],
    extras: ['mdi-v7'],
    build: {
      target: {
        browser: ['es2019', 'edge88', 'firefox78', 'chrome87', 'safari13.1'],
        node: 'node20',
      },
      vueRouterMode: 'history',
      vitePlugins: [
        [
          '@intlify/unplugin-vue-i18n/vite',
          {
            ssr: ctx.modeName === 'ssr',
            include: [fileURLToPath(new URL('./src/i18n', import.meta.url))],
          },
        ],
      ],
    },
    devServer: {
      host: '0.0.0.0',
      open: false,
    },
    framework: {
      config: {},
      plugins: ['Dark', 'Dialog', 'Notify'],
      iconSet: 'mdi-v7',
      cssAddon: true,
    },
    animations: [],
    pwa: {
      workboxMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest'
    },
  };
});
