Skip to content
Snippets Groups Projects
Select Git revision
  • 8eb82060985076ec2ee9498086ae59e211ca7f15
  • develop default protected
  • master
  • 0.0.6
  • 0.0.3
5 results

command_line.py

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'
                }
              }]
            ]
          }
        }
      }
    }