nuxt.config.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. './styles/index.scss'
  39. ],
  40. /*
  41. ** Plugins to load before mounting the App
  42. */
  43. plugins: [
  44. '@/plugins/element-ui',
  45. '@/plugins/http',
  46. '@/plugins/quill',
  47. ],
  48. /*
  49. ** Nuxt.js modules
  50. */
  51. modules: [
  52. // Doc: https://github.com/nuxt-community/axios-module#usage
  53. '@nuxtjs/axios',
  54. '@nuxtjs/proxy'
  55. ],
  56. /*
  57. ** Axios module configuration
  58. */
  59. axios: {
  60. // See https://github.com/nuxt-community/axios-module#options
  61. },
  62. /**
  63. * Proxy
  64. */
  65. proxy: [
  66. ['/api', { target: 'https://dev.test.proginn.com/', changeOrigin: true }]
  67. ],
  68. /*
  69. ** Build configuration
  70. */
  71. build: {
  72. /*
  73. ** You can extend webpack config here
  74. */
  75. extend(config, ctx) {
  76. }
  77. }
  78. }