nuxt.config.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. export default {
  2. // Enable server-side rendering (https://go.nuxtjs.dev/ssr-mode)
  3. ssr: false,
  4. // Auto import components (https://go.nuxtjs.dev/config-components)
  5. components: true,
  6. head: {
  7. titleTemplate: 'Frames, par Opentalent',
  8. title: 'frames',
  9. meta: [
  10. { charset: 'utf-8' },
  11. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  12. { hid: 'description', name: 'description', content: '' },
  13. ],
  14. link: [
  15. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
  16. ]
  17. },
  18. // Global CSS: https://go.nuxtjs.dev/config-css
  19. css: [
  20. '~/assets/style/global.scss'
  21. ],
  22. i18n: {
  23. locales: [
  24. {
  25. code: 'fr',
  26. file: 'fr-FR.js'
  27. }
  28. ],
  29. lazy: true,
  30. langDir: 'lang/',
  31. defaultLocale: 'fr',
  32. vueI18n: {
  33. silentTranslationWarn: true,
  34. silentFallbackWarn: true
  35. }
  36. },
  37. // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  38. plugins: [
  39. { src: '~/plugins/vue2-leaflet-markercluster.js', mode: 'client' },
  40. { src: '~/plugins/theming.js', mode: 'client' },
  41. { src: '~/plugins/iframeResizer.js', mode: 'client' },
  42. ],
  43. // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  44. buildModules: [
  45. // https://go.nuxtjs.dev/typescript
  46. '@nuxt/typescript-build',
  47. // https://go.nuxtjs.dev/vuetify
  48. '@nuxtjs/vuetify',
  49. '@nuxtjs/fontawesome'
  50. ],
  51. // Modules: https://go.nuxtjs.dev/config-modules
  52. modules: [
  53. '@nuxtjs/i18n',
  54. '@nuxtjs/axios',
  55. 'nuxt-leaflet',
  56. [
  57. 'nuxt-fontawesome', {
  58. imports: [
  59. {
  60. set: '@fortawesome/free-solid-svg-icons',
  61. icons: ['fas']
  62. },
  63. {
  64. set: '@fortawesome/free-brands-svg-icons',
  65. icons: ['fab']
  66. }
  67. ]
  68. }
  69. ],
  70. '@nuxtjs/date-fns',
  71. 'vue-social-sharing/nuxt'
  72. ],
  73. dateFns: {
  74. defaultLocale: 'fr-FR',
  75. fallbackLocale: 'en-US'
  76. },
  77. // Vuetify module configuration
  78. // @see https://vuetifyjs.com/en/features/theme/
  79. vuetify: {
  80. customVariables: ['~/assets/style/variables.scss'],
  81. treeShake: true,
  82. theme: {
  83. themes: {
  84. light: {
  85. primary: '#e4611b'
  86. }
  87. },
  88. options: {
  89. customProperties: true
  90. }
  91. }
  92. },
  93. // Build Configuration: https://go.nuxtjs.dev/config-build
  94. build: {
  95. },
  96. // Env
  97. publicRuntimeConfig: {
  98. baseURL: process.env.CLIENT_API_BASE_URL,
  99. axios: {
  100. https: true,
  101. browserBaseURL: process.env.CLIENT_API_BASE_URL
  102. }
  103. },
  104. privateRuntimeConfig: {
  105. baseURL: process.env.SSR_API_BASE_URL,
  106. axios: { baseURL: process.env.SSR_API_BASE_URL }
  107. }
  108. }