nuxt.config.js 2.6 KB

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