nuxt.config.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. const pkg = require('./package')
  2. module.exports = {
  3. mode: 'spa',
  4. /**
  5. * 打包文件
  6. */
  7. build: {
  8. vendor: ['axios', 'element-ui']
  9. },
  10. /*
  11. ** Headers of the page
  12. */
  13. head: {
  14. title: pkg.name,
  15. meta: [
  16. { charset: 'utf-8' },
  17. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  18. { hid: 'description', name: 'description', content: pkg.description }
  19. ],
  20. link: [
  21. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
  22. ]
  23. },
  24. /*
  25. ** Customize the progress-bar color
  26. */
  27. loading: { color: '#fff' },
  28. /*
  29. ** Global CSS
  30. */
  31. css: [
  32. 'element-ui/lib/theme-chalk/index.css',
  33. '@/assets/css/main.css',
  34. ],
  35. /*
  36. ** Plugins to load before mounting the App
  37. */
  38. plugins: [
  39. '@/plugins/element-ui',
  40. '@/plugins/http',
  41. '@/plugins/quill',
  42. ],
  43. /*
  44. ** Nuxt.js modules
  45. */
  46. modules: [
  47. // Doc: https://github.com/nuxt-community/axios-module#usage
  48. '@nuxtjs/axios',
  49. '@nuxtjs/proxy'
  50. ],
  51. /*
  52. ** Axios module configuration
  53. */
  54. axios: {
  55. // See https://github.com/nuxt-community/axios-module#options
  56. },
  57. /**
  58. * Proxy
  59. */
  60. proxy: [
  61. ['/api', { target: 'https://dev.test.proginn.com/', changeOrigin: true }]
  62. ],
  63. /*
  64. ** Build configuration
  65. */
  66. build: {
  67. /*
  68. ** You can extend webpack config here
  69. */
  70. extend(config, ctx) {
  71. }
  72. }
  73. }