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