nuxt.config.ts 4.0 KB

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