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.

141 lines
3.0 KiB

  1. import colors from 'vuetify/es5/util/colors'
  2. import i18n from './i18n'
  3. export default {
  4. mode: 'spa',
  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. ],
  53. /*
  54. ** Nuxt.js modules
  55. */
  56. modules: [
  57. ['nuxt-i18n', i18n],
  58. '@nuxtjs/vuetify',
  59. // Doc: https://axios.nuxtjs.org/usage
  60. '@nuxtjs/axios',
  61. '@nuxtjs/eslint-module'
  62. ],
  63. buildModules: [
  64. '@nuxt/typescript-build',
  65. ['@nuxtjs/google-analytics', {
  66. id: process.env.GOOGLE_TRACKING_ID
  67. }]
  68. ],
  69. /*
  70. ** Axios module configuration
  71. ** See https://axios.nuxtjs.org/options
  72. */
  73. axios: {
  74. proxy: true
  75. },
  76. proxy: {
  77. // Use a fake value for use at build-time
  78. '/v1/': {
  79. target: process.env.API_URL || 'http://127.0.0.1:8000'
  80. }
  81. },
  82. /*
  83. ** vuetify module configuration
  84. ** https://github.com/nuxt-community/vuetify-module
  85. */
  86. vuetify: {
  87. theme: {
  88. primary: colors.blue.darken2,
  89. accent: colors.grey.darken3,
  90. secondary: colors.amber.darken3,
  91. info: colors.teal.lighten1,
  92. warning: colors.amber.base,
  93. error: colors.deepOrange.accent4,
  94. success: colors.green.accent3,
  95. themes: {
  96. dark: {
  97. primary: '#21CFF3',
  98. accent: '#FF4081',
  99. secondary: '#ffe18d',
  100. success: '#4CAF50',
  101. info: '#2196F3',
  102. warning: '#FB8C00',
  103. error: '#FF5252'
  104. },
  105. light: {
  106. primary: '#1976D2',
  107. accent: '#e91e63',
  108. secondary: '#30b1dc',
  109. success: '#4CAF50',
  110. info: '#2196F3',
  111. warning: '#FB8C00',
  112. error: '#FF5252'
  113. }
  114. }
  115. }
  116. },
  117. /*
  118. ** Build configuration
  119. */
  120. build: {
  121. /*
  122. ** You can extend webpack config here
  123. */
  124. publicPath: process.env.PUBLIC_PATH || '/_nuxt/',
  125. extend(config, ctx) {
  126. config.module.rules.push({
  127. test: /\.(txt|csv|conll|jsonl)$/i,
  128. loader: 'file-loader',
  129. options: {
  130. name: '[path][name].[ext]'
  131. }
  132. })
  133. }
  134. }
  135. }