nuxt.config.js 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. ],
  13. link: [
  14. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
  15. ]
  16. },
  17. /*
  18. ** Customize the progress-bar color
  19. */
  20. loading: { color: '#fff' },
  21. /*
  22. ** Global CSS
  23. */
  24. css: [
  25. 'element-ui/lib/theme-chalk/index.css',
  26. { src: '~/assets/css/main.scss', lang: 'scss' }
  27. ],
  28. /*
  29. ** Plugins to load before mounting the App
  30. */
  31. plugins: [
  32. '@/plugins/element-ui',
  33. '~/plugins/api'
  34. ],
  35. /*
  36. ** Nuxt.js dev-modules
  37. */
  38. buildModules: [
  39. ],
  40. /*
  41. ** Nuxt.js modules
  42. */
  43. modules: [
  44. '@nuxtjs/axios',
  45. '@nuxtjs/style-resources',
  46. 'cookie-universal-nuxt'
  47. ],
  48. router: {
  49. middleware: 'auth'
  50. },
  51. styleResources: {
  52. scss: './assets/css/main.scss',
  53. },
  54. /*
  55. ** Build configuration
  56. */
  57. build: {
  58. transpile: [/^element-ui/],
  59. /*
  60. ** You can extend webpack config here
  61. */
  62. extend (config, ctx) {
  63. }
  64. },
  65. axios: {
  66. proxy: false,
  67. prefix: '/api', // baseURL
  68. credentials: true,
  69. },
  70. // proxy: {
  71. // '/api/': {
  72. // target: 'http://localhost:8080', // 代理地址
  73. // // changeOrigin: true,
  74. // // pathRewrite: {
  75. // // '^/api': ''
  76. // // },
  77. // },
  78. // },
  79. server: {
  80. port: 8000
  81. }
  82. }