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.

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