nuxt.config.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. import fs from 'fs';
  2. import type { I18nOptions } from 'vue-i18n'
  3. // https://v3.nuxtjs.org/api/configuration/nuxt.config
  4. export default {
  5. vuetify: {
  6. customVariables: ['~/assets/css/variables.scss'],
  7. treeShake: true,
  8. theme: {
  9. options: {
  10. customProperties: true
  11. },
  12. dark: false,
  13. themes: {
  14. light: {
  15. ot_green: '#00ad8e',
  16. ot_light_green: '#a9e0d6',
  17. ot_dark_grey: '#324150',
  18. ot_dark_grey_hover: '#2c3a48',
  19. ot_grey: '#777777',
  20. ot_header_menu: '#ECE7E5',
  21. ot_light_grey: '#f5f5f5',
  22. ot_super_light_grey: '#ecf0f5',
  23. ot_danger: '#f56954',
  24. ot_success: '#00a65a',
  25. ot_warning: '#f39c12',
  26. ot_info: '#3c8dbc',
  27. ot_menu_color: '#b8c7ce',
  28. ot_content_color: '#ecf0f4',
  29. ot_border_menu: '#f4f4f4',
  30. ot_white: '#ffffff',
  31. ot_black: '#000000'
  32. },
  33. }
  34. }
  35. },
  36. css: [
  37. 'vuetify/lib/styles/main.sass'
  38. ],
  39. runtimeConfig: {
  40. // Private config that is only available on the server
  41. baseUrl: '',
  42. baseUrlLegacy: '',
  43. baseUrlAdminLegacy: '',
  44. baseUrlTypo3: '',
  45. baseUrlMercure: '',
  46. // Config within public will be also exposed to the client
  47. public: {
  48. baseUrl: '',
  49. baseUrlLegacy: '',
  50. baseUrlAdminLegacy: '',
  51. baseUrlTypo3: '',
  52. baseUrlMercure: '',
  53. }
  54. },
  55. hooks: {
  56. 'builder:watch': console.log
  57. },
  58. app: {
  59. head: {
  60. title: 'Opentalent',
  61. meta: [
  62. { charset: 'utf-8' },
  63. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  64. { hid: 'description', name: 'description', content: '' },
  65. { name: 'msapplication-TileColor', content: '#324250' },
  66. { name: 'msapplication-TileImage', content: '/favicon/mstile-144x144.png' }
  67. ],
  68. link: [
  69. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
  70. { rel: 'apple-touch-icon-precomposed', sizes: '57x57', href: '/favicon/apple-touch-icon-57x57.png' },
  71. { rel: 'apple-touch-icon-precomposed', sizes: '114x114', href: '/favicon/apple-touch-icon-114x114.png' },
  72. { rel: 'apple-touch-icon-precomposed', sizes: '72x72', href: '/favicon/apple-touch-icon-72x72.png' },
  73. { rel: 'apple-touch-icon-precomposed', sizes: '144x144', href: '/favicon/apple-touch-icon-144x144.png' },
  74. { rel: 'apple-touch-icon-precomposed', sizes: '120x120', href: '/favicon/apple-touch-icon-120x120.png' },
  75. { rel: 'apple-touch-icon-precomposed', sizes: '152x152', href: '/favicon/apple-touch-icon-152x152.png' },
  76. { rel: 'icon', sizes: '32x32', type: 'image/x-icon', href: '/favicon/favicon-32x32.png' },
  77. { rel: 'icon', sizes: '16x16', type: 'image/x-icon', href: '/favicon/favicon-16x16.png' },
  78. ]
  79. }
  80. },
  81. modules: [
  82. [
  83. '@pinia/nuxt',
  84. {
  85. autoImports: [
  86. // automatically imports `usePinia()`
  87. 'defineStore',
  88. // automatically imports `usePinia()` as `usePiniaStore()`
  89. ['defineStore', 'definePiniaStore'],
  90. ],
  91. }
  92. ],
  93. '@pinia-orm/nuxt',
  94. 'nuxt-lodash',
  95. '@nuxtjs/i18n',
  96. ],
  97. typescript: {
  98. strict: true
  99. },
  100. i18n: {
  101. langDir: 'lang',
  102. lazy: true,
  103. locales: [
  104. {
  105. code: 'en',
  106. iso: 'en-US',
  107. file: 'en.json',
  108. name: 'English'
  109. },
  110. {
  111. code: 'fr',
  112. iso: 'fr-FR',
  113. file: 'fr.json',
  114. name: 'Français'
  115. }
  116. ],
  117. defaultLocale: 'fr',
  118. fallbackLocale: 'en',
  119. detectBrowserLanguage: false,
  120. vueI18n: {
  121. legacy: false,
  122. }
  123. } as I18nOptions,
  124. build: {
  125. transpile: ['vuetify'],
  126. },
  127. vite: {
  128. define: {
  129. 'process.env.DEBUG': process.env.DEBUG,
  130. },
  131. //@ts-ignore
  132. server : {
  133. https: {
  134. key: fs.readFileSync('local.app-v3.opentalent.fr.key'),
  135. cert: fs.readFileSync('local.app-v3.opentalent.fr.crt'),
  136. },
  137. port: 443,
  138. hmr: {
  139. protocol: 'wss'
  140. }
  141. },
  142. }
  143. }