import settings from './settings'
export default {
  ssr: false,
  server: {
    port: settings.port, // default: 3000
    // host: '192.168.3.14' // default: localhost
    // host:"localhost",
    host:settings.host,
  },
  // disableHostCheck: true,
  modules: [
    '@nuxtjs/axios',
    '@nuxtjs/proxy'
  ],
  axios: {
    prefix:settings.prefix,
    proxy: true
  },
  proxy: {
    '/demo': {
      target: 'https://www.huijy.net/',
      pathRewrite: {
        '^/demo' : '/demo'
      }
    }
  },
  head: {
    title: '智慧易加',
    meta: [{
        charset: 'utf-8'
      },
      {
        name: 'viewport',
        content: 'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no'
      }
    ],
    link: [{
      rel: 'icon',
      type: 'image/x-icon',
      href: '/favicon.ico'
    }]
  },
  plugins: [
    '~/plugins/vant',
    '~/plugins/vue-map'
    ],
  build: {
    babel: {
      plugins: [
        [
          'import',
          {
            libraryName: 'vant',
            // 目前在 nuxt 中无法按需引入样式，因此采用手动引入的方式
            style: false
          },
          'vant'
        ]
      ]
    }
  },
  css:[
    "~assets/css/common.css"
  ]
};
