| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- const pkg = require('./package')
- module.exports = {
- mode: 'universal',
- env: {
- BASE_URL: process.env.BASE_URL
- },
- /**
- * 打包文件
- */
- build: {
- vendor: ['element-ui']
- },
- server: {
- host: `0.0.0.0`,
- port: 3000,
- },
- /*
- ** Headers of the page
- */
- head: {
- title: '程序员客栈',
- meta: [
- { charset: 'utf-8' },
- { name: 'viewport', content: 'width=device-width, initial-scale=1' },
- { name: 'baidu-site-verification', content: '7IbkIN9Kwp' },
- { 'http-equiv': 'X-UA-Compatible', content: 'IE=edge,chrome=1' },
- // hid: 'x', 可在页面内覆盖这里
- { name: 'robots', content: 'noindex,follow' },
- { name: 'description', content: pkg.description },
- { 'http-equiv': 'Cache-Control', content: 'no-transform' },
- { 'http-equiv': 'Cache-Control', content: 'no-siteapp' },
- ],
- link: [
- { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
- ]
- },
- /*
- ** Customize the progress-bar color
- */
- loading: { color: '#fff' },
- /*
- ** Global CSS
- */
- css: [
- '@/assets/css/common.css',
- '@/assets/css/special.css',
- ],
- /*
- ** Plugins to load before mounting the App
- */
- plugins: [
- 'plugins/common',
- 'plugins/element',
- // 'plugins/http',
- 'plugins/nuxtAxios',
- ],
- /*
- ** Axios module configuration
- */
- axios: {
- // See https://github.com/nuxt-community/axios-module#options
- // proxy: true,
- // https: true,
- progress: true,
- // baseURL: process.env.BASE_URL || '',
- // browserBaseURL: '',
- timeout: 15000,
- credentials: true,
- proxyHeaders: true,
- debug: true
- },
- /**
- * Proxy
- */
- proxy: [
- ['/api', { target: 'https://dev.test.proginn.com', changeOrigin: true }],
- ['/image', { target: 'https://stacdn.proginn.com', changeOrigin: true }],
- ],
- /*
- ** Nuxt.js modules
- */
- modules: [
- '@nuxtjs/axios',
- '@nuxtjs/proxy',
- ],
- /*
- ** Build configuration
- */
- build: {
- /*
- ** You can extend webpack config here
- */
- extend(config, ctx) {
- }
- }
- }
|