Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Jan 25, 2024
1 parent 71aa87f commit 641bbd9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/pages/getting-started/nextjs-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: "Getting started in Next.js App router"

## Installation

Install Lucia using your package manager of your choice. While not strictly necessary, we recommend installing [Oslo](https://oslo.js.org), which Lucia is built on, for various auth utilities (which a lot of the guides use).
Install Lucia using your package manager of your choice. While not strictly necessary, we recommend installing [Oslo](https://oslo.js.org), which Lucia is built on, for various auth utilities (which a lot of the guides in the docs use).

```
npm install lucia@beta oslo
Expand Down Expand Up @@ -56,15 +56,16 @@ globalThis.crypto = webcrypto as Crypto;
node --experimental-web-crypto index.js
```

## Configure
## Update configuration

If you've installed Oslo, we recommend marking the package external to prevent it from getting bundled. Strictly speaking, this is only required when using `oslo/password` module.
If you've installed Oslo, we recommend marking its dependencies as external to prevent it from getting bundled. This is only required when using the `oslo/password` module.

```ts
// next.config.ts
const config = {
experimental: {
serverComponentsExternalPackages: ["oslo"]
const nextConfig = {
webpack: (config) => {
config.externals.push("@node-rs/argon2", "@node-rs/bcrypt");
return config;
}
};
```
Expand Down

0 comments on commit 641bbd9

Please sign in to comment.