nuxt.config.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. export default {
  2. /*
  3. ** Nuxt rendering mode
  4. ** See https://nuxtjs.org/api/configuration-mode
  5. */
  6. mode: 'universal',
  7. /*
  8. ** Nuxt target
  9. ** See https://nuxtjs.org/api/configuration-target
  10. */
  11. target: 'server',
  12. /*
  13. ** Headers of the page
  14. ** See https://nuxtjs.org/api/configuration-head
  15. */
  16. head: {
  17. title: '中德智慧官方网站',
  18. meta: [
  19. { name: 'renderer', content: 'webkit'},
  20. { name: 'force-rendering', content: 'webkit'},
  21. { 'http-equiv': 'X-UA-Compatible', content: 'IE=Edge,chrome=1'},
  22. { name: 'baidu-site-verification', content: 'mREHhDF8nW'},
  23. /*以上是设置双核浏览器默认状态下使用极速模式打开*/
  24. { charset: 'utf-8' },
  25. { hid: 'description', name: 'description', content: '中德智慧'},
  26. { name: 'format-detection', content: 'telephone=no' },
  27. { name: 'viewport', content: 'width=device-width, initial-scale=1.0, user-scalable=no' },
  28. /*新增搜狗、神马、360 */
  29. { name: '360-site-verification', content: '850970beabd63bd397272b6dd73a1aba' },
  30. { name: 'sogou_site_verification', content: 'y3fi8ttkxP' },
  31. { name: 'shenma-site-verification', content: '15230d9dfb2e66bfecf2408862f2462c_1537497601' }
  32. ],
  33. link: [
  34. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
  35. ],
  36. script: []
  37. },
  38. /*
  39. ** Global CSS
  40. */
  41. css: [
  42. 'element-ui/lib/theme-chalk/index.css',
  43. '~assets/css/reset.css'
  44. ],
  45. /*
  46. ** Plugins to load before mounting the App
  47. ** https://nuxtjs.org/guide/plugins
  48. */
  49. plugins: [
  50. '@/plugins/element-ui'
  51. ],
  52. /*
  53. ** Auto import components
  54. ** See https://nuxtjs.org/api/configuration-components
  55. */
  56. components: true,
  57. /*
  58. ** Nuxt.js dev-modules
  59. */
  60. buildModules: [
  61. ],
  62. /*
  63. ** Nuxt.js modules
  64. */
  65. modules: [
  66. ],
  67. /*
  68. ** Build configuration
  69. ** See https://nuxtjs.org/api/configuration-build/
  70. */
  71. build: {
  72. transpile: [/^element-ui/],
  73. extractCSS: {
  74. allChunks: true
  75. },
  76. vender: ['axios'],
  77. extend (config, { isDev, isClient }) {
  78. if (isDev && isClient) {
  79. config.module.rules.push({
  80. enforce: 'pre',
  81. test: /\.(js|vue)$/,
  82. loader: 'eslint-loader',
  83. exclude: /(node_modules)/
  84. })
  85. }
  86. }
  87. },
  88. cache: true,
  89. //禁止预加载效果
  90. performance: {
  91. prefetch: false
  92. },
  93. }