web-vitals
web-vitals copied to clipboard
Nuxt 3 support
Hey,
I will work on making the module work with Nuxt 3 out of the box.
The work is currently done on the next
branch and will be released probably next week after some testing.
That's awesome! How is it going? ETA?
@andreemic
The PR is ready. Just waiting to be reviewed and merged 🙂
Any news?
Is there any update regarding this issue and its related PR #47? According to a comment in the PR, the main
branch is already working well with Nuxt 3; but it is unfortunately not true with [email protected]
or later versions (including the stable release [email protected]
). The error is likely to be related with https://github.com/nuxt/framework/commit/74b81bbeaa492af0efee2da5b4a5639050938178.
Logs of postinstall script with @nuxtjs/[email protected]
(latest release on main
branch) and [email protected]
:
home postinstall$ nuxt prepare
│ Nuxi 3.0.0-rc.13
│ WARN [@nuxtjs/web-vitals] Please define a provider to activate this module
│ ERROR (node:42744) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
│ (Use `node --trace-warnings ...` to show where the warning was created)
│ √ Types generated in .nuxt
└─ Done in 3.1s
compared with logs of postinstall script with @nuxtjs/[email protected]
(latest release on main
branch) and [email protected]
:
home postinstall$ nuxt prepare
│ Nuxi 3.0.0-rc.14
│ ERROR Cannot destructure property 'nuxt' of 'this' as it is undefined.
│ at webVitalsModule (D:/Areas/Workspaces/GitHubRepos/tdcloud/node_modules/.pnpm/@[email protected]/node_modules/@nuxtjs/web-vitals/dist/index.j
│ at installModule (/D:/Areas/Workspaces/GitHubRepos/tdcloud/node_modules/.pnpm/@[email protected][email protected]/node_modules/@nuxt/kit/dist/index.m
│ at async initNuxt (/D:/Areas/Workspaces/GitHubRepos/tdcloud/node_modules/.pnpm/[email protected]_t7kkosihzizynsd35m2tpz76wa/node_modules/nuxt/dist/ind
│ at async loadNuxt (/D:/Areas/Workspaces/GitHubRepos/tdcloud/node_modules/.pnpm/[email protected]_t7kkosihzizynsd35m2tpz76wa/node_modules/nuxt/dist/ind
│ at async loadNuxt (/D:/Areas/Workspaces/GitHubRepos/tdcloud/node_modules/.pnpm/@[email protected][email protected]/node_modules
│ at async Object.invoke (/D:/Areas/Workspaces/GitHubRepos/tdcloud/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/chunks/prepare.mjs:30:18)
│ at async _main (/D:/Areas/Workspaces/GitHubRepos/tdcloud/node_modules/.pnpm/[email protected]/node_modules/nuxi/dist/cli.mjs:50:20)
└─ Failed in 2.2s