nuxt.config.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. const URL = 'http://localhost:3000'
  2. export default {
  3. mode: 'universal',
  4. /*
  5. ** Headers of the page
  6. */
  7. head: {
  8. title: process.env.npm_package_name || '',
  9. meta: [
  10. { charset: 'utf-8' },
  11. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  12. { hid: 'description', name: 'description', content: process.env.npm_package_description || '' }
  13. ],
  14. link: [
  15. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
  16. { rel: 'stylesheet', href: '/css/font-awesome/css/all.css' },
  17. { rel: 'stylesheet', href: '/css/default.css' }
  18. ]
  19. },
  20. /*
  21. ** Customize the progress-bar color
  22. */
  23. loading: { color: '#fff' },
  24. /*
  25. ** Global CSS
  26. */
  27. css: [
  28. ],
  29. /*
  30. ** Plugins to load before mounting the App
  31. */
  32. plugins: [
  33. { src: '~/plugins/localStorage.js', ssr: false }
  34. ],
  35. /*
  36. ** Nuxt.js dev-modules
  37. */
  38. buildModules: [
  39. ],
  40. /*
  41. ** Nuxt.js modules
  42. */
  43. modules: [
  44. // Doc: https://bootstrap-vue.js.org
  45. 'bootstrap-vue/nuxt',
  46. // Doc: https://axios.nuxtjs.org/usage
  47. '@nuxtjs/axios',
  48. '@nuxtjs/pwa',
  49. '@nuxtjs/auth'
  50. ],
  51. /*
  52. ** Axios module configuration
  53. ** See https://axios.nuxtjs.org/options
  54. */
  55. axios: {
  56. proxy: true,
  57. baseURL: URL
  58. },
  59. proxy: {
  60. '/api': URL
  61. },
  62. /*
  63. ** Build configuration
  64. */
  65. build: {
  66. /*
  67. ** You can extend webpack config here
  68. */
  69. extend (config, ctx) {
  70. }
  71. },
  72. auth: {
  73. strategies: {
  74. local: {
  75. endpoints: {
  76. login: {
  77. propertyName: 'token'
  78. },
  79. logout: true
  80. }
  81. }
  82. }
  83. }
  84. }