Skip to content

Commit

Permalink
fix(nuxt): Optimize @clerk/vue
Browse files Browse the repository at this point in the history
  • Loading branch information
wobsoriano committed Dec 20, 2024
1 parent c6837d1 commit 0cd5a13
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/nuxt/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export default defineNuxtModule<ModuleOptions>({
// Handle Nuxt-specific imports (e.g #imports)
nuxt.options.build.transpile.push(resolver.resolve('./runtime'));

// Optimize @clerk/vue to avoid missing injection Symbol key errors
nuxt.options.vite.optimizeDeps = nuxt.options.vite.optimizeDeps || {};
nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || [];
nuxt.options.vite.optimizeDeps.include.push('@clerk/vue');

// Add the `@clerk/vue` plugin
addPlugin(resolver.resolve('./runtime/plugin'));

Expand Down

0 comments on commit 0cd5a13

Please sign in to comment.