Skip to content
Snippets Groups Projects
Select Git revision
  • 27d2f9f1c7b2bdb55778e21e09a15893cdb57017
  • master default protected
  • dev protected
  • 551-init-broker-service-permissions
  • release-1.10 protected
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • release-1.9 protected
  • 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
  • 485-fixity-checks
  • 530-various-schema-problems-with-subsets
  • release-1.7 protected
  • fix/auth-service
  • 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
  • v1.9.2 protected
  • v1.9.2-rc0 protected
  • v1.9.1 protected
41 results

nuxt.config.js

Blame
  • nuxt.config.js 3.10 KiB
    import colors from 'vuetify/es5/util/colors'
    import isDocker from 'is-docker'
    
    // pick env vars from .env file or get them passed through docker-compose
    if (!isDocker()) {
      require('dotenv').config()
    }
    
    export default {
      // Disable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
      // ssr: false,
    
      // Target (https://go.nuxtjs.dev/config-target)
      target: 'static',
    
      // Global page headers (https://go.nuxtjs.dev/config-head)
      head: {
        titleTemplate: '%s - fda-ui',
        title: 'fda-ui',
        meta: [
          { charset: 'utf-8' },
          { name: 'viewport', content: 'width=device-width, initial-scale=1' },
          { hid: 'description', name: 'description', content: '' }
        ],
        link: [
          { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
        ]
      },
    
      // Global CSS (https://go.nuxtjs.dev/config-css)
      css: [
        '@assets/globals.scss'
      ],
    
      // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
      plugins: [
        { src: '~/plugins/toast', ssr: false }, // only client side
        { src: '~/plugins/vuex-persist', ssr: false } // only client side
        // { src: '~/plugins/mock' }
      ],
    
      // Auto import components (https://go.nuxtjs.dev/config-components)
      components: true,
    
      // Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
      buildModules: [
        // https://go.nuxtjs.dev/eslint
        '@nuxtjs/eslint-module',
        // https://go.nuxtjs.dev/vuetify
        '@nuxtjs/vuetify'
      ],
    
      // Modules (https://go.nuxtjs.dev/config-modules)
      modules: [
        // https://go.nuxtjs.dev/axios
        '@nuxtjs/proxy',
        '@nuxtjs/axios',
        ['nuxt-i18n', {
          locales: [
            { code: 'de', file: 'de-DE.js', name: 'Deutsch' },
            { code: 'en', file: 'en-US.js', name: 'English' }
          ],
          lazy: true,
          langDir: 'lang/',
          // strategy: 'no_prefix',
          defaultLocale: 'en'
          // detectBrowserLanguage: false
        }]
      ],
    
      // Axios module configuration (https://go.nuxtjs.dev/config-axios)
      axios: {
        proxy: true
      },
    
      proxy: {
        '/api/container': process.env.API_CONTAINER,
        '/api/database': process.env.API_DATABASE,
        '/api/analyse': process.env.API_ANALYSE,
        '/api/tables': { target: process.env.API_TABLES, pathRewrite: { '^/api/tables/': '' } }
      },
    
      serverMiddleware: [
        { path: '/server-middleware', handler: 'server-middleware/index.js' }
      ],
    
      // Vuetify module configuration (https://go.nuxtjs.dev/config-vuetify)
      vuetify: {
        customVariables: ['~/assets/variables.scss'],
        theme: {
          light: true,
          themes: {
            light: {
              primary: colors.blue.darken2,
              accent: colors.grey.darken3,
              secondary: colors.amber.darken3,
              info: colors.teal.lighten1,
              warning: colors.amber.base,
              error: colors.deepOrange.accent4,
              success: colors.green.accent3
            }
          }
        }
      },
    
      // Build Configuration (https://go.nuxtjs.dev/config-build)
      build: {
        babel: {
          presets (env, [preset, options]) {
            return [
              ['@babel/preset-env', {
                targets: {
                  node: 'current'
                }
              }]
            ]
          }
        }
      }
    }