nuxt.config.js 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * @Description:
  3. * @Author: 欧阳承珺
  4. * @LastEditors: 欧阳承珺
  5. * @Date: 2022-10-17 11:06:52
  6. * @LastEditTime: 2022-11-16 16:42:17
  7. */
  8. export default {
  9. // Global page headers: https://go.nuxtjs.dev/config-head
  10. head: {
  11. title: '',
  12. htmlAttrs: {
  13. lang: 'en',
  14. },
  15. meta: [
  16. { charset: 'utf-8' },
  17. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  18. { hid: 'description', name: 'description', content: '' },
  19. { name: 'format-detection', content: 'telephone=no' },
  20. ],
  21. link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
  22. },
  23. env: {
  24. BASE_URL: process.env.BASE_URL,
  25. NODE_ENV: process.env.NODE_ENV
  26. },
  27. // Global CSS: https://go.nuxtjs.dev/config-css
  28. css: [
  29. '@/assets/main.scss',
  30. {src:'element-ui/lib/theme-chalk/index.css'},
  31. ],
  32. // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  33. plugins: [
  34. '~/plugins/axios',
  35. {src: '~plugins/element-ui', ssr: false},
  36. {src: '@/plugins/localStorage', ssr: false},
  37. {src: '@/plugins/vueqr', ssr: false},
  38. ],
  39. // Auto import components: https://go.nuxtjs.dev/config-components
  40. components: true,
  41. // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  42. buildModules: [
  43. // https://go.nuxtjs.dev/typescript
  44. '@nuxt/typescript-build',
  45. // https://windicss.org/guide/
  46. 'nuxt-windicss',
  47. '@nuxtjs/composition-api/module'
  48. ],
  49. // Modules: https://go.nuxtjs.dev/config-modules
  50. modules: [
  51. '@nuxtjs/axios',
  52. '@nuxtjs/proxy',
  53. ],
  54. axios: {
  55. timeout: 3000,
  56. baseURL: process.env.BASE_URL,
  57. // prefix: '/17pdf-backend-core',
  58. },
  59. // proxy: {
  60. // '/17pdf-backend-core': { target: 'http://81.68.234.235:8999',}
  61. // },
  62. // Build Configuration: https://go.nuxtjs.dev/config-build
  63. build: {
  64. vendor: ['element-ui']
  65. },
  66. }