nuxt.config.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. export default {
  2. /*
  3. ** Nuxt rendering mode
  4. ** See https://nuxtjs.org/api/configuration-mode
  5. */
  6. mode: "universal",
  7. /*
  8. ** Headers of the page
  9. ** See https://nuxtjs.org/api/configuration-head
  10. */
  11. head: {
  12. titleTemplate: "%s - SeMiD",
  13. meta: [
  14. { charset: "utf-8" },
  15. { name: "viewport", content: "width=device-width, initial-scale=1" },
  16. {
  17. hid: "description",
  18. name: "description",
  19. content: "We don't know what SeMiD is"
  20. }
  21. ],
  22. link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }]
  23. },
  24. /*
  25. ** Global CSS
  26. */
  27. css: ["@fortawesome/fontawesome-svg-core/styles.css"],
  28. /*
  29. ** Plugins to load before mounting the App
  30. ** https://nuxtjs.org/guide/plugins
  31. */
  32. plugins: [
  33. { src: "~/plugins/axios.ts", mode: "client" },
  34. "~/plugins/graphql.ts",
  35. "~/plugins/fontawesome.ts"
  36. ],
  37. /*
  38. ** Nuxt.js dev-modules
  39. */
  40. buildModules: ["@nuxt/typescript-build"],
  41. /*
  42. ** Nuxt.js modules
  43. */
  44. modules: ["@nuxtjs/axios"],
  45. /*
  46. ** Build configuration
  47. ** See https://nuxtjs.org/api/configuration-build/
  48. */
  49. build: {
  50. loaders: {
  51. file: { esModule: false }
  52. },
  53. extend(config) {
  54. config.module.rules.push({
  55. test: /\.(ogg|mp3|wav|mpe?g)$/i,
  56. loader: "file-loader",
  57. options: {
  58. name: "[path][name].[ext]"
  59. }
  60. });
  61. }
  62. },
  63. serverMiddleware: [
  64. // Will register redirect-ssl npm package
  65. // Will register file from project api directory to handle /api/* requires
  66. { path: "/api", handler: "~/api/index.js" }
  67. ]
  68. };