nuxt.config.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. const env = require('./env')
  2. export default {
  3. // Global page headers: https://go.nuxtjs.dev/config-head
  4. head: {
  5. title: 'de-net-official',
  6. htmlAttrs: {
  7. lang: 'en'
  8. },
  9. meta: [
  10. { charset: 'utf-8' },
  11. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  12. { hid: 'description', name: 'description', content: '' },
  13. { name: 'format-detection', content: 'telephone=no' }
  14. ],
  15. link: [
  16. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
  17. ]
  18. },
  19. script: [
  20. {
  21. src: "https://www.googletagmanager.com/gtag/js?id=G-699E5T8F6M",
  22. async
  23. },
  24. {
  25. innerHtml: `window.dataLayer = window.dataLayer || [];
  26. function gtag(){dataLayer.push(arguments);}
  27. gtag('js', new Date());
  28. gtag('config', 'G-699E5T8F6M');`
  29. }
  30. ],
  31. // Global CSS: https://go.nuxtjs.dev/config-css
  32. css: [
  33. ],
  34. // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  35. plugins: [
  36. 'plugins/vant'
  37. ],
  38. // Auto import components: https://go.nuxtjs.dev/config-components
  39. components: true,
  40. // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  41. buildModules: [
  42. ],
  43. // Modules: https://go.nuxtjs.dev/config-modules
  44. modules: [
  45. // https://go.nuxtjs.dev/bootstrap
  46. 'bootstrap-vue/nuxt',
  47. ],
  48. // Build Configuration: https://go.nuxtjs.dev/config-build
  49. build: {
  50. },
  51. router: {
  52. extendRoutes(routes, resolve) {
  53. routes.push({
  54. name: 'RedPackage',
  55. path: '/:id?',
  56. component: resolve(__dirname, 'pages/index.vue')
  57. },
  58. {
  59. name: 'LuckDraw',
  60. path: '/luckdraw/:id?',
  61. component: resolve(__dirname, 'pages/luckdraw.vue')
  62. },
  63. {
  64. name: 'ToolBox',
  65. path: '/toolbox/:id',
  66. component: resolve(__dirname, 'pages/toolbox/index.vue')
  67. },
  68. {
  69. name: 'Install',
  70. path: '/install',
  71. component: resolve(__dirname, 'pages/install.vue')
  72. },
  73. {
  74. name: 'NFT',
  75. path: '/nft/:id/:account',
  76. component: resolve(__dirname, 'pages/nft/index.vue')
  77. },
  78. {
  79. name: 'NftGroup',
  80. path: '/nft_group/:id',
  81. component: resolve(__dirname, 'pages/nft/group.vue')
  82. },
  83. {
  84. name: 'custom',
  85. path: '*',
  86. component: resolve(__dirname, 'pages/404.vue')
  87. })
  88. }
  89. },
  90. env: {
  91. NUXT_ENV: env[process.env.MODE]
  92. }
  93. }