nuxt.config.js 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. const webpack = require('webpack')
  2. export default {
  3. /*
  4. ** Nuxt rendering mode
  5. ** See https://nuxtjs.org/api/configuration-mode
  6. */
  7. mode: 'universal',
  8. /*
  9. ** Nuxt target
  10. ** See https://nuxtjs.org/api/configuration-target
  11. */
  12. target: 'server',
  13. /*
  14. ** Headers of the page
  15. ** See https://nuxtjs.org/api/configuration-head
  16. 逻辑狗官网 - 中德智慧教育
  17. 关键词:逻辑狗官网、逻辑狗教材、逻辑狗课程、逻辑狗思维训练课程、儿童思维教育、0-12岁儿童
  18. 描述:逻辑狗官方网站,专为0-12岁儿童设计的思维训练课程,中德智慧教育,全球优质教育内容输出平台
  19. */
  20. head: {
  21. title: '逻辑狗官网-中德智慧教育',
  22. meta: [
  23. { name: 'renderer', content: 'webkit'},
  24. { name: 'force-rendering', content: 'webkit'},
  25. { 'http-equiv': 'X-UA-Compatible', content: 'IE=Edge,chrome=1'},
  26. { name: 'baidu-site-verification', content: 'mREHhDF8nW'},
  27. // <meta property="og:image" content="https://developer.mozilla.org/static/img/opengraph-logo.png"></meta>
  28. // <meta itemprop="image" content="http://example.com/image.jpg" />
  29. { property: 'image', content: "https://luojigou-app-commit-pic.luojigou.vip/FrKVMB5LmgU1Q_I_HGjoz7B8Kkdb?imageView2/0/q/50|imageslim" },
  30. { itemprop: 'image', content: "https://luojigou-app-commit-pic.luojigou.vip/FrKVMB5LmgU1Q_I_HGjoz7B8Kkdb?imageView2/0/q/50|imageslim" },
  31. { property: 'og:image', content: "https://luojigou-app-commit-pic.luojigou.vip/FrKVMB5LmgU1Q_I_HGjoz7B8Kkdb?imageView2/0/q/50|imageslim" },
  32. { property: 'og:url', content: "https://www.zaojiao.net" },
  33. { property: 'url', content: "https://www.zaojiao.net" },
  34. /*以上是设置双核浏览器默认状态下使用极速模式打开*/
  35. { charset: 'utf-8' },
  36. { hid: 'description', name: 'description', content: '中德智慧教育'},
  37. { hid: 'description', name: 'og:description', content: '中德智慧教育'},
  38. { name: 'format-detection', content: 'telephone=no' },
  39. { name: 'viewport', content: 'width=device-width, initial-scale=1.0, user-scalable=no' },
  40. /*新增搜狗、神马、360 */
  41. // { name: '360-site-verification', content: '850970beabd63bd397272b6dd73a1aba' },
  42. // { name: 'sogou_site_verification', content: 'y3fi8ttkxP' },
  43. // { name: 'shenma-site-verification', content: '15230d9dfb2e66bfecf2408862f2462c_1537497601' }
  44. ],
  45. link: [
  46. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
  47. { rel: 'stylesheet', href: '/common/common.css' }
  48. ],
  49. script: [
  50. { src: 'https://hm.baidu.com/hm.js?2a45c0311559f89f2ee65d1ac438d204' }
  51. ]
  52. },
  53. /*
  54. ** Global CSS
  55. */
  56. css: [
  57. 'element-ui/lib/theme-chalk/index.css',
  58. '~assets/css/reset.css',
  59. '~assets/css/animate.css',
  60. 'swiper/css/swiper.css'
  61. ],
  62. /*
  63. ** Plugins to load before mounting the App
  64. ** https://nuxtjs.org/guide/plugins
  65. */
  66. plugins: [
  67. { src: '@/plugins/element-ui', ssr: false },
  68. { src: "@/plugins/vue-swiper", ssr: false },
  69. { src: "@/plugins/vue-scroll-reveal", ssr: false },
  70. {
  71. src: '@/plugins/filter.js'
  72. },
  73. { src: '~/plugins/baidu.js' }
  74. ],
  75. /*
  76. ** Auto import components
  77. ** See https://nuxtjs.org/api/configuration-components
  78. */
  79. components: true,
  80. /*
  81. ** Nuxt.js dev-modules
  82. */
  83. buildModules: [
  84. ],
  85. /*
  86. ** Nuxt.js modules
  87. */
  88. modules: [
  89. ],
  90. /*
  91. ** Build configuration
  92. ** See https://nuxtjs.org/api/configuration-build/
  93. */
  94. build: {
  95. transpile: [/^element-ui/],
  96. extractCSS: {
  97. allChunks: true
  98. },
  99. // extractCSS: true,
  100. // optimization: {
  101. // splitChunks: {
  102. // cacheGroups: {
  103. // commons: {
  104. // test: /[\\/]node_modules[\\/]/,
  105. // name: "vendor",
  106. // chunks: "all"
  107. // }
  108. // }
  109. // }
  110. // },
  111. vender: ['axios'],
  112. extend (config, { isDev, isClient }) {
  113. if (isDev && isClient) {
  114. config.module.rules.push({
  115. enforce: 'pre',
  116. test: /\.(js|vue)$/,
  117. loader: 'eslint-loader',
  118. exclude: /(node_modules)/
  119. })
  120. }
  121. },
  122. plugins: [
  123. new webpack.ProvidePlugin({
  124. '$' : 'jquery'
  125. })
  126. ]
  127. },
  128. cache: true,
  129. //禁止预加载效果
  130. performance: {
  131. prefetch: false
  132. },
  133. }