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.

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