Uh oh!
There was an error while loading. Please reload this page.
feat(nuxt,vue): Introduce Nuxt SDK - #4541
Conversation
🦋 Changeset detectedLatest commit: 86262db The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| } | ||
| nuxtApp.vueApp.use(clerkPlugin, { | ||
| ...(useRuntimeConfig().public.clerk ?? {}), |
There was a problem hiding this comment.
This is the client-side useRuntimeConfig composable in Nuxt.
It returns the available runtime config variables.
| import { useRuntimeConfig } from '#imports'; | ||
| export function clerkClient(event: H3Event) { | ||
| const runtimeConfig = useRuntimeConfig(event); |
There was a problem hiding this comment.
This is the server-side useRuntimeConfig and requires an H3Event to be passed in so that it can properly parse environment variables in different runtimes
LekoArts
left a comment
There was a problem hiding this comment.
Left some comments 👍 Also, aren't we missing a README? 😅
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
@LekoArts README added! 😆 (will be updated later to match existing READMEs after we got docs ready) |
Uh oh!
There was an error while loading. Please reload this page.
b808fe0 to
6010ef6Compare
LekoArts
left a comment
There was a problem hiding this comment.
Left some more comments I'd like to be addressed before merging but unblocking it since it's generally fine ![]()
Uh oh!
There was an error while loading. Please reload this page.
| ### Build | ||
| To build the package locally with the TypeScript compiler, run: | ||
| ```bash | ||
| npm run build | ||
| ``` |
There was a problem hiding this comment.
At some point I want to update our READMEs to remove this portion, let's not add it here in the first place. For the end-user who wants to use the package it's not really useful 😊
| "h3": "^1.13.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "latest", |
There was a problem hiding this comment.
Let's replace the alias with a version range instead. We use ^18.19.33 in other places. If it indeed only works with Node 22, then we'd need to change the engines#node
There was a problem hiding this comment.
Removed it! I was testing something yesterday and forgot to remove it. Thanks!
Co-authored-by: Lennart <lekoarts@gmail.com>
5d7502c to
86262dbCompareCo-authored-by: Lennart <lekoarts@gmail.com>
Description
This PR is a continuation of our effort to port
vue-clerkto our JavaScript monorepo, following up on PR #4461. The key change is extracting the Nuxt module into its own package instead of keeping it as a submodule undervue-clerk/nuxt.Nuxt is a metaframework built on top of Vue and Nitro - it's what Next.js is to React.
Implementation
The module can be easily integrated into any Nuxt project:
Features
@clerk/backendclerkClientfor accessing Clerk resources@clerk/vueand adds all components and composables (auto-imported, a standard Nuxt convention)E2E tests and documentation to follow in a separate PR.
Resolves ECO-225
Checklist
npm testruns as expected.npm run buildruns as expected.Type of change