nuxt.config.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. },
  23. {
  24. innerHtml: `window.dataLayer = window.dataLayer || [];
  25. function gtag(){dataLayer.push(arguments);}
  26. gtag('js', new Date());
  27. gtag('config', 'G-699E5T8F6M');`
  28. }
  29. ],
  30. // Global CSS: https://go.nuxtjs.dev/config-css
  31. css: [
  32. ],
  33. // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  34. plugins: [
  35. 'plugins/vant'
  36. ],
  37. // Auto import components: https://go.nuxtjs.dev/config-components
  38. components: true,
  39. // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  40. buildModules: [
  41. ],
  42. // Modules: https://go.nuxtjs.dev/config-modules
  43. modules: [
  44. // https://go.nuxtjs.dev/bootstrap
  45. 'bootstrap-vue/nuxt',
  46. ],
  47. // Build Configuration: https://go.nuxtjs.dev/config-build
  48. build: {
  49. },
  50. router: {
  51. extendRoutes(routes, resolve) {
  52. routes.push({
  53. name: 'RedPackage',
  54. path: '/:id?',
  55. component: resolve(__dirname, 'pages/index.vue')
  56. },
  57. {
  58. name: 'LuckDraw',
  59. path: '/luckdraw/:id?',
  60. component: resolve(__dirname, 'pages/luckdraw.vue')
  61. },
  62. {
  63. name: 'ToolBox',
  64. path: '/toolbox/:id',
  65. component: resolve(__dirname, 'pages/toolbox/index.vue')
  66. },
  67. {
  68. name: 'Install',
  69. path: '/install',
  70. component: resolve(__dirname, 'pages/install.vue')
  71. },
  72. {
  73. name: 'NFT',
  74. path: '/nft/:id/:account',
  75. component: resolve(__dirname, 'pages/nft/index.vue')
  76. },
  77. {
  78. name: 'NftGroup',
  79. path: '/nft_group/:id',
  80. component: resolve(__dirname, 'pages/nft/group.vue')
  81. },
  82. {
  83. name: 'custom',
  84. path: '*',
  85. component: resolve(__dirname, 'pages/404.vue')
  86. })
  87. }
  88. },
  89. env: {
  90. NUXT_ENV: env[process.env.MODE]
  91. }
  92. }