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.

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