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.

124 lines
3.0 KiB

3 years ago
3 years ago
  1. export default {
  2. // Global page headers: https://go.nuxtjs.dev/config-head
  3. head: {
  4. title: 'flylocal-v5-nuxt',
  5. meta: [
  6. { charset: 'utf-8' },
  7. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  8. { hid: 'description', name: 'description', content: '' },
  9. { name: 'format-detection', content: 'telephone=no' }
  10. ],
  11. link: [
  12. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
  13. ]
  14. },
  15. // server: {
  16. // host: '192.168.178.100',
  17. // port: 3010
  18. // },
  19. serverMiddleware: [
  20. '~/middleware/redirects.js'
  21. ],
  22. // Global CSS: https://go.nuxtjs.dev/config-css
  23. css: [
  24. '~assets/css/main.css'
  25. ],
  26. // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  27. plugins: [
  28. { src: '~/plugins/vue2-leaflet-markercluster.js', mode: 'client' }
  29. ],
  30. // Auto import components: https://go.nuxtjs.dev/config-components
  31. components: true,
  32. router: {
  33. extendRoutes (routes, resolve) {
  34. routes.push(
  35. {
  36. name: 'go-orig-dest',
  37. path: '/go/:o/:d',
  38. component: resolve(__dirname, 'pages/go.vue')
  39. },
  40. {
  41. name: 'go-orig',
  42. path: '/go/:o',
  43. component: resolve(__dirname, 'pages/go.vue')
  44. },
  45. {
  46. name: 'dates-orig-dest',
  47. path: '/dates/:o/:d',
  48. component: resolve(__dirname, 'pages/dates.vue')
  49. },
  50. {
  51. name: 'flights-orig-dest-departure-time',
  52. path: '/flights/:o/:d/:departure/:time',
  53. component: resolve(__dirname, 'pages/flights.vue')
  54. },
  55. {
  56. name: 'flights-orig-dest-departure',
  57. path: '/flights/:o/:d/:departure',
  58. component: resolve(__dirname, 'pages/flights.vue')
  59. }
  60. )
  61. }
  62. },
  63. // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  64. buildModules: [
  65. // https://go.nuxtjs.dev/eslint
  66. '@nuxtjs/eslint-module',
  67. // https://go.nuxtjs.dev/stylelint
  68. '@nuxtjs/stylelint-module',
  69. // https://go.nuxtjs.dev/tailwindcss
  70. '@nuxtjs/tailwindcss',
  71. '@nuxtjs/style-resources'
  72. ],
  73. styleResources: {
  74. scss: [
  75. '~assets/scss/mixins.scss',
  76. '~assets/scss/variables.scss'
  77. ]
  78. },
  79. // Modules: https://go.nuxtjs.dev/config-modules
  80. modules: [
  81. // https://go.nuxtjs.dev/axios
  82. '@nuxtjs/axios',
  83. // https://go.nuxtjs.dev/pwa
  84. '@nuxtjs/pwa',
  85. 'nuxt-leaflet',
  86. 'nuxt-vue-select'
  87. ],
  88. // Axios module configuration: https://go.nuxtjs.dev/config-axios
  89. axios: {},
  90. // PWA module configuration: https://go.nuxtjs.dev/pwa
  91. pwa: {
  92. manifest: {
  93. lang: 'en'
  94. }
  95. },
  96. // Build Configuration: https://go.nuxtjs.dev/config-build
  97. build: {
  98. extend (config, ctx) {
  99. if (ctx.isDev) {
  100. config.devtool = ctx.isClient ? 'source-map' : 'inline-source-map'
  101. }
  102. },
  103. loaders: {
  104. sass: {
  105. implementation: require('sass')
  106. },
  107. scss: {
  108. implementation: require('sass')
  109. }
  110. }
  111. }
  112. }