Skip to content

Commit 0ed5803

Browse files
authored
docs: add explanation about the auth in the optimizer (#7207)
1 parent e682a6a commit 0ed5803

File tree

1 file changed

+10
-1
lines changed
  • packages/docs/src/routes/docs/integrations/authjs

1 file changed

+10
-1
lines changed

packages/docs/src/routes/docs/integrations/authjs/index.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,16 @@ When migrating from `@builder.io/qwik-auth` to `@auth/qwik`, there are a couple
106106
+export const { onRequest, useSession, useSignIn, useSignOut } =
107107
+ QwikAuth$(({ env }) => ({
108108
```
109-
109+
3. Update your `vite.config.ts` to include `"@auth/qwik"` to avoid potentials import issues
110+
```diff
111+
export default defineConfig(({ command, mode }): UserConfig => {
112+
return {
113+
plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
114+
// This tells Vite which dependencies to pre-build in dev mode.
115+
optimizeDeps: {
116+
include: ["@auth/qwik"],
117+
},
118+
```
110119

111120

112121
## Qwik API

0 commit comments

Comments
 (0)