Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Inform about official SDK #184

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/astro-clerk-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# astro-clerk-auth
Community package that integrates [Clerk](https://clerk.com/) with [Astro](https://astro.build/)

> [!IMPORTANT]
> This project has graduated to an [official SDK](https://clerk.com/changelog/2024-07-18-clerk-astro). Please proceed [here](https://clerk.com/docs/references/astro/migrating-from-astro-community-sdk) for migration instructions.

## Live Demo
[Online Demo](https://astro-clerk.elef.codes/)

Expand Down Expand Up @@ -281,9 +284,9 @@ export function Header() {

### Use Clerk in Headless Mode

[Clerk Headless mode](https://clerk.com/docs/components/clerk-provider) (see `ClerkJSVariant` prop their docs) is a Clerk variant that is focused towards getting smaller bundle sizes. This variant does *not* include React or any client side components for Clerk (e.g. their signin component). Because of that the bundle size is drastically smaller. On top of that it also lazy loads the JavaScript client side.
[Clerk Headless mode](https://clerk.com/docs/components/clerk-provider) (see `ClerkJSVariant` prop their docs) is a Clerk variant that is focused towards getting smaller bundle sizes. This variant does *not* include React or any client side components for Clerk (e.g. their signin component). Because of that the bundle size is drastically smaller. On top of that it also lazy loads the JavaScript client side.

In order to use headless mode with this package, change your Astro configuration file to:
In order to use headless mode with this package, change your Astro configuration file to:

```diff
import { defineConfig } from "astro/config";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function createIntegration<P extends { mode: 'hotload' | 'bundled' }>({ mode }:
name: '@astro-clerk-auth/integration',
hooks: {
'astro:config:setup': ({ config, injectScript, updateConfig, logger, command }) => {
logger.warn('This project has graduated to an official SDK. Please proceed to https://clerk.com/docs/references/astro/migrating-from-astro-community-sdk for migration instructions.');

if (config.output === 'static')
logger.error(`${packageName} requires SSR to be turned on. Please update output to "server"`);

Expand Down
Loading