nuxt.config.ts 3.9 KB

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