You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

174 lines
3.7 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. import colors from 'vuetify/es5/util/colors'
  2. import i18n from './i18n'
  3. export default {
  4. ssr: false,
  5. /*
  6. ** Headers of the page
  7. */
  8. head: {
  9. titleTemplate: '%s - ' + process.env.npm_package_name,
  10. title: process.env.npm_package_name || '',
  11. meta: [
  12. { charset: 'utf-8' },
  13. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  14. {
  15. hid: 'description',
  16. name: 'description',
  17. content: process.env.npm_package_description || ''
  18. }
  19. ],
  20. link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }]
  21. },
  22. server: {
  23. host: '0.0.0.0' // default: localhost
  24. },
  25. env: {
  26. baseUrl: '/v1'
  27. },
  28. /*
  29. ** Customize the progress-bar color
  30. */
  31. loading: { color: '#fff' },
  32. /*
  33. ** Global CSS
  34. */
  35. css: [],
  36. /*
  37. ** Plugins to load before mounting the App
  38. */
  39. plugins: [
  40. '~/plugins/filters.js',
  41. '~/plugins/vue-youtube.js',
  42. '~/plugins/vue-shortkey.js',
  43. '~/plugins/services.ts',
  44. '~/plugins/color.ts',
  45. '~/plugins/role.ts'
  46. ],
  47. /*
  48. ** Nuxt.js modules
  49. */
  50. modules: [
  51. ['nuxt-i18n', i18n],
  52. // Doc: https://axios.nuxtjs.org/usage
  53. '@nuxtjs/axios',
  54. '@nuxtjs/eslint-module'
  55. ],
  56. buildModules: [
  57. '@nuxt/typescript-build',
  58. '@nuxtjs/composition-api/module',
  59. [
  60. '@nuxtjs/google-analytics',
  61. {
  62. id: process.env.GOOGLE_TRACKING_ID
  63. }
  64. ],
  65. [
  66. '@nuxtjs/vuetify',
  67. {
  68. customVariables: ['~/assets/css/fonts.css'],
  69. treeShake: true,
  70. defaultAssets: {
  71. font: false,
  72. icons: ['mdiSvg']
  73. }
  74. }
  75. ],
  76. [
  77. '@nuxtjs/google-fonts',
  78. {
  79. families: {
  80. Roboto: [100, 300, 400, 500, 700, 900]
  81. },
  82. display: 'swap',
  83. download: true,
  84. overwriting: true,
  85. inject: true
  86. }
  87. ]
  88. ],
  89. /*
  90. ** Axios module configuration
  91. ** See https://axios.nuxtjs.org/options
  92. */
  93. axios: {
  94. proxy: true
  95. },
  96. proxy: {
  97. // Use a fake value for use at build-time
  98. '/v1/': {
  99. target: process.env.API_URL || 'http://127.0.0.1:8000'
  100. }
  101. },
  102. /*
  103. ** vuetify module configuration
  104. ** https://github.com/nuxt-community/vuetify-module
  105. */
  106. vuetify: {
  107. theme: {
  108. primary: colors.blue.darken2,
  109. accent: colors.grey.darken3,
  110. secondary: colors.amber.darken3,
  111. info: colors.teal.lighten1,
  112. warning: colors.amber.base,
  113. error: colors.deepOrange.accent4,
  114. success: colors.green.accent3,
  115. themes: {
  116. dark: {
  117. primary: '#21CFF3',
  118. accent: '#FF4081',
  119. secondary: '#ffe18d',
  120. success: '#4CAF50',
  121. info: '#2196F3',
  122. warning: '#FB8C00',
  123. error: '#FF5252'
  124. },
  125. light: {
  126. primary: '#1976D2',
  127. accent: '#e91e63',
  128. secondary: '#30b1dc',
  129. success: '#4CAF50',
  130. info: '#2196F3',
  131. warning: '#FB8C00',
  132. error: '#FF5252'
  133. }
  134. }
  135. }
  136. },
  137. /*
  138. ** Build configuration
  139. */
  140. build: {
  141. /*
  142. ** You can extend webpack config here
  143. */
  144. publicPath: process.env.PUBLIC_PATH || '/_nuxt/',
  145. extend(config, _) {
  146. // config.module.rules.push({
  147. // test: /\.(txt|csv|conll|jsonl)$/i,
  148. // loader: 'file-loader',
  149. // options: {
  150. // name: '[path][name].[ext]'
  151. // }
  152. // })
  153. config.module.rules.push({
  154. enforce: 'pre',
  155. test: /\.(txt|csv|json|jsonl)$/,
  156. loader: 'raw-loader',
  157. exclude: /(node_modules)/
  158. })
  159. config.module.rules.push({
  160. test: /\.(ogg|mp3|wav|mpe?g)$/i,
  161. loader: 'file-loader',
  162. options: {
  163. name: '[path][name].[ext]'
  164. }
  165. })
  166. }
  167. }
  168. }