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.

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