nuxt.config.js 2.9 KB

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