nuxt.config.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. ],
  42. /*
  43. ** Nuxt.js modules
  44. */
  45. modules: [
  46. // Doc: https://github.com/nuxt-community/axios-module#usage
  47. '@nuxtjs/axios',
  48. '@nuxtjs/proxy'
  49. ],
  50. /*
  51. ** Axios module configuration
  52. */
  53. axios: {
  54. // See https://github.com/nuxt-community/axios-module#options
  55. },
  56. /**
  57. * Proxy
  58. */
  59. proxy: [
  60. ['/api', { target: 'https://dev.test.proginn.com/', changeOrigin: true }]
  61. ],
  62. /*
  63. ** Build configuration
  64. */
  65. build: {
  66. /*
  67. ** You can extend webpack config here
  68. */
  69. extend(config, ctx) {
  70. }
  71. }
  72. }