You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

NuxtJS 2引入特定模块导致PWA应用性能下降问题咨询

NuxtJS 2添加@nuxtjs/device或@nuxtjs/gtm模块后性能下降问题

我使用NuxtJS 2版本创建了一款PWA应用,原本Lighthouse评分良好且运行正常。但在nuxt.config.js的modules配置项中添加@nuxtjs/device或@nuxtjs/gtm模块后,即便未对模块进行任何配置,应用性能也开始变差。

依赖配置(package.json)

"dependencies": {
    "@nuxtjs/axios": "^5.13.6",
    "@nuxtjs/device": "2.1.0",
    "@nuxtjs/gtm": "^2.4.0",
    "@nuxtjs/pwa": "^3.3.5",
    "core-js": "^3.25.3",
    "nuxt": "^2.15.8",
    "vue": "^2.7.10",
    "vue-server-renderer": "^2.7.10",
    "vue-template-compiler": "^2.7.10"
  },

模块配置(nuxt.config.js)

modules: [
    // https://go.nuxtjs.dev/axios
    '@nuxtjs/axios',
    // https://go.nuxtjs.dev/pwa
    '@nuxtjs/pwa',
    '@nuxtjs/device',
    '@nuxtjs/gtm',
  ]

补充说明:此问题符合内存泄漏的表现特征。


内容的提问来源于stack exchange,提问作者Vadim Gadjimuradov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.03 14:15:34