Skip to content

Commit 5913ae9

Browse files
committed
fix(nextjs): Import from @clerk/shared to avoid barrel side effects in RSC
Import clerkJSScriptUrl, buildClerkJSScriptAttributes, clerkUIScriptUrl from @clerk/shared/loadClerkJsScript instead of @clerk/react/internal in the shared ClerkScriptTags component. The @clerk/react/internal barrel re-exports modules that use React.createContext, which breaks when the RSC bundler evaluates the barrel in server component context.
1 parent 3d14a18 commit 5913ae9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/nextjs/src/utils/clerk-script-tags.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { buildClerkJSScriptAttributes, clerkJSScriptUrl, clerkUIScriptUrl } from '@clerk/react/internal';
1+
import { buildClerkJSScriptAttributes, clerkJSScriptUrl, clerkUIScriptUrl } from '@clerk/shared/loadClerkJsScript';
22
import React from 'react';
33

44
type ClerkScriptTagsProps = {

0 commit comments

Comments
 (0)