export default {
  // Disable server-side rendering: https://go.nuxtjs.dev/ssr-mode
  ssr: false,

  // Global page headers: https://go.nuxtjs.dev/config-head
  head: {
    title: 'light-bet',
    htmlAttrs: {
      lang: 'en'
    },
    meta: [
      { charset: 'utf-8' },
      { name: 'viewport', content: 'width=device-width, initial-scale=1' },
      { hid: 'description', name: 'description', content: '' },
      { name: 'format-detection', content: 'telephone=no' }
    ],
    link: [
      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
    ]
  },

  // Global CSS: https://go.nuxtjs.dev/config-css
  css: [
    'vant/lib/index.css',
    "~/assets/css/fonts.css"
  ],
  styleResources: {
    scss: ['~/assets/style/common.scss'],
  },
  // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  plugins: [
    '@/plugins/vant'
  ],

  // Auto import components: https://go.nuxtjs.dev/config-components
  components: true,

  // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  buildModules: [
  ],

  // Modules: https://go.nuxtjs.dev/config-modules
  modules: [
    '@nuxtjs/axios',
    '@nuxtjs/proxy'
  ],
  axios: {
    proxy: true,
  },
  proxy: {
    '/api': {
      target: process.env.NODE_ENV !== 'production' ? process.env.DEV_BASE_API : process.env.PRO_BASE_API,
      pathRewrite: {
        '^/api': '/',
      },
      changeOrigin: true,
    },
  },
  publicRuntimeConfig: {
    baseApi: process.env.NODE_ENV !== 'production' ? process.env.DEV_BASE_API : process.env.PRO_BASE_API,
    productName: process.env.PRODUCT_NAME
  },

  env: {
    baseUrl: process.env.NODE_ENV !== 'production' ? process.env.DEV_BASE_API : process.env.PRO_BASE_API
  },

  // Build Configuration: https://go.nuxtjs.dev/config-build
  build: {
  }
}
