Skip to content

Commit

Permalink
test(nuxt): Fix incorrect env vars (#4606)
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano authored Nov 20, 2024
1 parent bf713bc commit dd237b0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .changeset/shy-months-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
1 change: 1 addition & 0 deletions integration/presets/nuxt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const nuxtNode = applicationConfig()
.setName('nuxt-node')
.useTemplate(templates['nuxt-node'])
.setEnvFormatter('public', key => `NUXT_PUBLIC_${key}`)
.setEnvFormatter('private', key => `NUXT_${key}`)
.addScript('setup', 'pnpm install')
.addScript('dev', 'pnpm dev')
.addScript('build', 'pnpm build')
Expand Down
12 changes: 0 additions & 12 deletions integration/templates/nuxt-node/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
export default defineNuxtConfig({
modules: ['@clerk/nuxt'],
// The code below is only necessary in our test environment.
// Env vars are automatically read by Nuxt. See https://nuxt.com/docs/guide/going-further/runtime-config
runtimeConfig: {
public: {
clerk: {
publishableKey: process.env.NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY,
},
},
clerk: {
secretKey: process.env.CLERK_SECRET_KEY,
},
},
});
2 changes: 1 addition & 1 deletion packages/nuxt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Make sure the following environment variables are set in a `.env` file in your N

```
NUXT_PUBLIC_CLERK_PUBLISHABLE_KEY=[publishable-key]
CLERK_SECRET_KEY=[secret-key]
NUXT_CLERK_SECRET_KEY=[secret-key]
```

Then, add `@clerk/nuxt` to the `modules` section of `nuxt.config.ts`:
Expand Down

0 comments on commit dd237b0

Please sign in to comment.