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.

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