Skip to content
Snippets Groups Projects
Select Git revision
  • db958def44d0dc9fa12e7a3fa0282a77ff899d0d
  • master default protected
  • replication_test
  • release-1.10 protected
  • dev protected
  • 556-usage-statistics
  • 553-semantic-recommendation-2
  • 553-semantic-recommendation
  • release-1.9 protected
  • 551-init-broker-service-permissions
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • 499-standalone-compute-service-2
  • 539-load-tests
  • hotfix/helm-chart
  • luca_ba_new_interface
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • release-1.8 protected
  • 533-integrate-semantic-recommendation
  • feature/openshift
  • 518-spark-doesn-t-map-the-headers-correct
  • v1.10.4 protected
  • v1.10.3 protected
  • v1.10.2 protected
  • v1.10.1 protected
  • v1.10.0-rc13 protected
  • v1.10.0-rc12 protected
  • v1.10.0-rc11 protected
  • v1.10.0-rc10 protected
  • v1.10.0-rc9 protected
  • v1.10.0-rc8 protected
  • v1.10.0-rc7 protected
  • v1.10.0-rc6 protected
  • v1.10.0-rc5 protected
  • v1.10.0-rc4 protected
  • v1.10.0-rc3 protected
  • v1.10.0-rc2 protected
  • v1.10.0rc1 protected
  • v1.10.0rc0 protected
  • v1.10.0 protected
  • v1.9.3 protected
41 results

nuxt.config.ts

Blame
  • Martin Weise's avatar
    Martin Weise authored
    Signed-off-by: Martin Weise's avatarMartin Weise <martin.weise@tuwien.ac.at>
    1b4ade9d
    History
    nuxt.config.ts 3.41 KiB
    import {transformAssetUrls} from 'vite-plugin-vuetify'
    import vuetify from 'vite-plugin-vuetify'
    
    const proxy: any = {}
    
    /* proxies the backend calls, >>NOT<< the frontend calls (clicking) */
    if (process.env.NODE_ENV === 'development') {
      const api = 'http://localhost'
      proxy['/api'] = api
      proxy['/pid'] = {
        target: api + '/api',
        changeOrigin: true,
        pathRewrite: {
          '^/pid': '/pid'
        }
      }
      process.env.NUXT_PUBLIC_API_SERVER = api
    }
    
    /**
     * https://nuxt.com/docs/guide/concepts/rendering#hybrid-rendering
     */
    export default defineNuxtConfig({
      app: {
        head: {
          charset: 'utf-8',
          viewport: 'width=device-width, initial-scale=1',
          meta: [
            {'http-equiv': 'Content-Security-Policy', content: 'upgrade-insecure-requests'}
          ],
          htmlAttrs: {
            lang: 'en-US'
          }
        }
      },
    
      build: {
        transpile: ['vuetify'],
      },
    
      builder: 'vite',
    
      css: [
        'vuetify/lib/styles/main.sass',
        '@mdi/font/css/materialdesignicons.min.css',
        '@/assets/globals.css',
        '@/assets/overrides.css',
      ],
    
      runtimeConfig: {
        public: {
          commit: '',
          title: 'Database Repository',
          logo: '/logo.svg',
          icon: '/favicon.ico',
          touch: '/apple-touch-icon.png',
          version: 'bun-dev',
          broker: {
            /* mark encrypted connection with leading ^, e.g. ^amqp://localhost:5671/dbrepo will be displayed with (encrypted) suffix */
            connections: "amqp://localhost:5672/dbrepo,mqtt://localhost:1883/dbrepo",
            extra: ''
          },
          variant: {
            input: {
              normal: 'underlined',
              contrast: 'outlined',
            },
            button: {
              normal: 'flat',
              contrast: 'outlined',
            },
            list: {
              normal: '',
              contrast: 'flat',
            }
          },
          api: {
            client: 'http://localhost',
            server: 'http://gateway-service',
          },
          upload: {
            client: 'http://localhost/api/upload/files',
            prefix: '/'
          },
          database: {
            unsupported: 'AVG,BIT_AND,BIT_OR,BIT_XOR,COUNT,COUNTDISTINCT,GROUP_CONCAT,JSON_ARRAYAGG,JSON_OBJECTAGG,MAX,MIN,STD,STDDEV,STDDEV_POP,STDDEV_SAMP,SUM,VARIANCE,VAR_POP,VAR_SAMP,--',
            image: {
              width: 200,
              height: 200
            },
            extra: ''
          },
          pid: {
            default: {
              publisher: 'Example University'
            }
          },
          doi: {
            enabled: false,
            endpoint: 'https://doi.org'
          },
          links: {}
        }
      },
    
      devServer: {
        port: 3001
      },
    
      modules: [
        '@artmizu/nuxt-prometheus',
        '@nuxtjs/i18n',
        '@pinia/nuxt',
        '@pinia-plugin-persistedstate/nuxt',
        async (options, nuxt) => {
          nuxt.hooks.hook('vite:extendConfig', config => config.plugins.push(
            vuetify()
          ))
        },
      ],
    
      pinia: {
        storesDirs: ['./stores/**'],
      },
    
      piniaPersistedstate: {
        storage: 'localStorage'
      },
    
      i18n: {
        lazy: false,
        langDir: 'locales',
        strategy: 'no_prefix',
        defaultLocale: 'de',
        locales: [
          {
            'code': 'en',
            'file': 'en-US.json',
            'name': 'English (US)',
            'iso': 'en-US'
          },
          {
            'code': 'de',
            'file': 'de-AT.json',
            'name': 'German (AT)',
            'iso': 'de-AT'
          }
        ]
    
      },
    
      vite: {
        server: {
          proxy
        },
        vue: {
          template: {
            transformAssetUrls,
          },
        },
      },
    
      devtools: {enabled: true},
      compatibilityDate: '2024-07-24'
    })