nuxt.config.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. export default {
  2. ssr: false,
  3. server: {
  4. port: 8081, // default: 3000
  5. // host: '192.168.3.14' // default: localhost
  6. // host:"localhost",
  7. host:"192.168.0.105",
  8. },
  9. // disableHostCheck: true,
  10. modules: [
  11. '@nuxtjs/axios',
  12. '@nuxtjs/proxy'
  13. ],
  14. axios: {
  15. prefix:"/demo",
  16. proxy: true
  17. },
  18. proxy: {
  19. '/demo': {
  20. target: 'https://www.huijy.net/',
  21. pathRewrite: {
  22. '^/demo' : '/demo'
  23. }
  24. }
  25. },
  26. head: {
  27. title: '智慧易加',
  28. meta: [{
  29. charset: 'utf-8'
  30. },
  31. {
  32. name: 'viewport',
  33. content: 'width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no'
  34. }
  35. ],
  36. link: [{
  37. rel: 'icon',
  38. type: 'image/x-icon',
  39. href: '/favicon.ico'
  40. }]
  41. },
  42. plugins: [
  43. '~/plugins/vant',
  44. '~/plugins/vue-map'
  45. ],
  46. build: {
  47. babel: {
  48. plugins: [
  49. [
  50. 'import',
  51. {
  52. libraryName: 'vant',
  53. // 目前在 nuxt 中无法按需引入样式,因此采用手动引入的方式
  54. style: false
  55. },
  56. 'vant'
  57. ]
  58. ]
  59. }
  60. },
  61. css:[
  62. "~assets/css/common.css"
  63. ]
  64. };