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.

170 lines
3.6 KiB

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