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.

179 lines
3.8 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/vue-konva.js',
  44. '~/plugins/services.ts',
  45. '~/plugins/repositories.ts',
  46. '~/plugins/color.ts',
  47. '~/plugins/role.ts'
  48. ],
  49. /*
  50. ** Nuxt.js modules
  51. */
  52. modules: [
  53. ['nuxt-i18n', i18n],
  54. // Doc: https://axios.nuxtjs.org/usage
  55. '@nuxtjs/axios',
  56. '@nuxtjs/eslint-module'
  57. ],
  58. buildModules: [
  59. '@nuxt/typescript-build',
  60. '@nuxtjs/composition-api/module',
  61. [
  62. '@nuxtjs/google-analytics',
  63. {
  64. id: process.env.GOOGLE_TRACKING_ID
  65. }
  66. ],
  67. [
  68. '@nuxtjs/vuetify',
  69. {
  70. customVariables: ['~/assets/css/fonts.css'],
  71. treeShake: true,
  72. defaultAssets: {
  73. font: false,
  74. icons: ['mdiSvg']
  75. }
  76. }
  77. ],
  78. [
  79. '@nuxtjs/google-fonts',
  80. {
  81. families: {
  82. Roboto: [100, 300, 400, 500, 700, 900]
  83. },
  84. display: 'swap',
  85. download: true,
  86. overwriting: true,
  87. inject: true
  88. }
  89. ]
  90. ],
  91. /*
  92. ** Axios module configuration
  93. ** See https://axios.nuxtjs.org/options
  94. */
  95. axios: {
  96. proxy: true
  97. },
  98. proxy: {
  99. // Use a fake value for use at build-time
  100. '/v1/': {
  101. target: process.env.API_URL || 'http://127.0.0.1:8000'
  102. },
  103. '/media': {
  104. target: process.env.API_URL || 'http://127.0.0.1:8000'
  105. }
  106. },
  107. /*
  108. ** vuetify module configuration
  109. ** https://github.com/nuxt-community/vuetify-module
  110. */
  111. vuetify: {
  112. theme: {
  113. primary: colors.blue.darken2,
  114. accent: colors.grey.darken3,
  115. secondary: colors.amber.darken3,
  116. info: colors.teal.lighten1,
  117. warning: colors.amber.base,
  118. error: colors.deepOrange.accent4,
  119. success: colors.green.accent3,
  120. themes: {
  121. dark: {
  122. primary: '#21CFF3',
  123. accent: '#FF4081',
  124. secondary: '#ffe18d',
  125. success: '#4CAF50',
  126. info: '#2196F3',
  127. warning: '#FB8C00',
  128. error: '#FF5252'
  129. },
  130. light: {
  131. primary: '#1976D2',
  132. accent: '#e91e63',
  133. secondary: '#30b1dc',
  134. success: '#4CAF50',
  135. info: '#2196F3',
  136. warning: '#FB8C00',
  137. error: '#FF5252'
  138. }
  139. }
  140. }
  141. },
  142. /*
  143. ** Build configuration
  144. */
  145. build: {
  146. /*
  147. ** You can extend webpack config here
  148. */
  149. publicPath: process.env.PUBLIC_PATH || '/_nuxt/',
  150. extend(config, _) {
  151. // config.module.rules.push({
  152. // test: /\.(txt|csv|conll|jsonl)$/i,
  153. // loader: 'file-loader',
  154. // options: {
  155. // name: '[path][name].[ext]'
  156. // }
  157. // })
  158. config.module.rules.push({
  159. enforce: 'pre',
  160. test: /\.(txt|csv|json|jsonl)$/,
  161. loader: 'raw-loader',
  162. exclude: /(node_modules)/
  163. })
  164. config.module.rules.push({
  165. test: /\.(ogg|mp3|wav|mpe?g)$/i,
  166. loader: 'file-loader',
  167. options: {
  168. name: '[path][name].[ext]'
  169. }
  170. })
  171. }
  172. }
  173. }