nuxt.config.js 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. module.exports = {
  2. mode: 'universal',
  3. /*
  4. ** Headers of the page
  5. */
  6. head: {
  7. title: "SEEC软件工程教育云平台", //process.env.npm_package_name || '',
  8. meta: [
  9. { charset: 'utf-8' },
  10. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  11. { hid: 'description', name: 'description', content: process.env.npm_package_description ||
  12. 'SEEC软件工程教育云平台,一个旨在为在校学生或行业内人士,提供系统性自主学习软件工程领域知识服务的平台' }
  13. ],
  14. link: [
  15. { rel: 'icon', type: 'image/x-icon', href: '/seec.ico' }
  16. ]
  17. },
  18. /*
  19. ** Customize the progress-bar color
  20. */
  21. loading: { color: '#fff' },
  22. /*
  23. ** Global CSS
  24. */
  25. css: [
  26. 'element-ui/lib/theme-chalk/index.css',
  27. { src: '~/assets/css/main.scss', lang: 'scss' }
  28. ],
  29. /*
  30. ** Plugins to load before mounting the App
  31. */
  32. plugins: [
  33. {src: '@/plugins/element-ui', ssr: true},
  34. '~/plugins/api',
  35. '~plugins/echarts'
  36. ],
  37. /*
  38. ** Nuxt.js dev-modules
  39. */
  40. buildModules: [
  41. ],
  42. /*
  43. ** Nuxt.js modules
  44. */
  45. modules: [
  46. '@nuxtjs/axios',
  47. '@nuxtjs/style-resources',
  48. 'cookie-universal-nuxt'
  49. ],
  50. router: {
  51. middleware: 'auth'
  52. },
  53. styleResources: {
  54. scss: './assets/css/main.scss',
  55. },
  56. /*
  57. ** Build configuration
  58. */
  59. build: {
  60. transpile: [/^element-ui/],
  61. /*
  62. ** You can extend webpack config here
  63. */
  64. extend (config, ctx) {
  65. }
  66. },
  67. axios: {
  68. proxy: false,
  69. prefix: '/api', // baseURL
  70. credentials: true,
  71. },
  72. // proxy: {
  73. // '/api/': {
  74. // target: 'http://localhost:8080', // 代理地址
  75. // // changeOrigin: true,
  76. // // pathRewrite: {
  77. // // '^/api': ''
  78. // // },
  79. // },
  80. // },
  81. // server: {
  82. // https: true
  83. // }
  84. }