module.exports = { mode: 'universal', env: { APP_ENV: process.env.APP_ENV }, /* ** Headers of the page */ head: { title: '海外租房_美国|英国|澳洲|加拿大留学生租房_留学生公寓-hooli社区', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'keywords', name: 'keywords', content: '海外租房,美国租房,英国租房,澳大利亚租房,加拿大租房,留学生公寓,留学生租房' }, { hid: 'description', name: 'description', content: 'hooli社区是解决海外租房,留学生租房问题的网站,提供美国租房、英国租房、澳大利亚租房、加拿大租房等全球热门国家500+城市租房和海外高校生活、留学生租房问题解答。' } ], link: [ { rel: 'icon', type: 'image/x-icon', href: '//static.hoolihome.com/common/default/favicon.ico' }, { rel: 'stylesheet', type: 'text/css', href: '//at.alicdn.com/t/font_1006590_3emlk7mhe7y.css' } ] }, /* ** Customize the progress-bar color */ loading: '~/components/common/MyLoading.vue', /* ** Global CSS */ css: [ { src: '~/assets/css/main.less', lang: 'less' } ], /* ** Plugins to load before mounting the App */ plugins: [ { src: '~/plugins/redirect-mobile.js', ssr: false }, { src: '~/plugins/i18n.js', ssr: true }, { src: '~/plugins/axios.js', ssr: true }, { src: '~/plugins/common.js', ssr: true }, { src: '~/plugins/hooliAnalysis.js', ssr: false }, { src: '~/plugins/vue-lazyload.js', ssr: false } ], /* ** Nuxt.js modules */ modules: [ // Doc: https://github.com/nuxt-community/axios-module#usage '@nuxtjs/axios' ], /* ** Axios module configuration */ axios: { // See https://github.com/nuxt-community/axios-module#options }, /* ** Build configuration */ build: { /* ** You can extend webpack config here */ extend(config, ctx) { // Run ESLint on save if (ctx.isDev && ctx.isClient) { config.module.rules.push({ enforce: 'pre', test: /\.(js|vue)$/, loader: 'eslint-loader', exclude: /(node_modules)/ }) } }, publicPath: process.env.APP_ENV === 'prod' ? '//static.hoolihome.com/bbs/nuxt' : '/_nuxt/' // 可换cdn }, router: { middleware: 'i18n' }, serverMiddleware: ['~/api'] }