nuxt.config.js 1.4 KB

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