nuxt.config.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. const webpack = require('webpack')
  2. module.exports = {
  3. /*
  4. ** Headers of the page
  5. */
  6. head: {
  7. title: 'nuxt-demo',
  8. meta: [
  9. { charset: 'utf-8' },
  10. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  11. { hid: 'description', name: 'description', content: 'Nuxt.js project' }
  12. ],
  13. link: [
  14. { rel: 'icon', type: 'image/x-icon', href: '/icon.png' },
  15. // { rel: 'stylesheet', type: 'text/css', href: 'https://t.focus-res.cn/front-end/icon2018/iconfont.css' }
  16. ],
  17. script: [
  18. {src: 'https://api.map.baidu.com/api?v=2.0&ak=OxAEbfrVXXqWUSC4nP8mYi3bTKRBcP6u&s=1'},
  19. {src: "https://s22.cnzz.com/z_stat.php?id=1274340249&web_id=1274340249"},
  20. {src: "https://hm.baidu.com/hm.js?386f99c9fffaef40eb761d464a025698"},
  21. // {src: "http://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"},
  22. ]
  23. },
  24. /*
  25. ** Customize the progress bar color
  26. */
  27. loading: { color: '#3B8070' },
  28. plugins: [
  29. '~/plugins/element-ui',
  30. '~/plugins/youmeng'
  31. ],
  32. //全局css
  33. css:[
  34. '~assets/css/base.css',
  35. '~assets/css/iconfont.css',
  36. 'element-ui/lib/theme-chalk/index.css'
  37. ],
  38. /*
  39. ** Build configuration
  40. */
  41. build: {
  42. /*关闭ESLint
  43. ** Run ESLint on save
  44. */
  45. // extend (config, { isDev, isClient }) {
  46. // if (isDev && isClient) {
  47. // config.module.rules.push({
  48. // enforce: 'pre',
  49. // test: /\.(js|vue)$/,
  50. // loader: 'eslint-loader',
  51. // exclude: /(node_modules)/
  52. // })
  53. // }
  54. // }
  55. vendor: [
  56. 'axios',
  57. 'element-ui'
  58. ],
  59. postcss: [
  60. require('autoprefixer')({
  61. browsers: ['last 3 versions']
  62. })
  63. ],
  64. plugins: [
  65. new webpack.ProvidePlugin({
  66. '$': 'jquery'
  67. })
  68. ]
  69. }
  70. }