nuxt.config.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. const pkg = require('./package')
  2. module.exports = {
  3. mode: 'universal',
  4. /*
  5. ** Headers of the page
  6. */
  7. head: {
  8. title: pkg.name,
  9. meta: [
  10. { charset: 'utf-8' },
  11. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  12. { hid: 'description', name: 'description', content: pkg.description }
  13. ],
  14. link: [
  15. { rel: 'stylesheet', type: 'text/css', href: '/swiper.min.css' },
  16. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
  17. ]
  18. },
  19. /*
  20. ** Customize the progress-bar color
  21. */
  22. loading: { color: '#fff' },
  23. /*
  24. ** Global CSS
  25. */
  26. css: [
  27. "iview/dist/styles/iview.css",
  28. "@/assets/style/index.scss",
  29. "@/assets/iconfont/iconfont.css",
  30. ],
  31. /*
  32. ** Plugins to load before mounting the App
  33. */
  34. plugins: [
  35. { src: '~plugins/iview.js', ssr: true },
  36. { src: '~plugins/lazy.js', ssr: true },
  37. { src: '~assets/iconfont/iconfont.js', ssr: false },
  38. { src: '~plugins/plugins.js', ssr: false },
  39. ],
  40. /*
  41. ** Nuxt.js modules
  42. */
  43. modules: [
  44. '@nuxtjs/axios',
  45. ],
  46. /*
  47. ** Axios module configuration
  48. */
  49. axios: {
  50. // See https://github.com/nuxt-community/axios-module#options
  51. // prefix: '/api/',
  52. // proxy: true // Can be also an object with default options
  53. },
  54. // proxy: {
  55. // '/api/': { target: 'http://localhost:8080', pathRewrite: {'^/api/': ''} }
  56. // },
  57. /*
  58. ** Build configuration
  59. */
  60. build: {
  61. /*
  62. ** You can extend webpack config here
  63. */
  64. extend(config, { isDev, isClient }) {
  65. // const vueLoader = config.module.rules.find((rule) => rule.loader === 'vue-loader');
  66. //
  67. // vueLoader.options.loaders.sass = 'vue-style-loader!css-loader!sass-loader';
  68. }
  69. }
  70. }