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
相关产品推荐
相关产品推荐

