Skip to content

Commit 7e452da

Browse files
docs: review plugins
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
1 parent 6095424 commit 7e452da

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

docs/setup-the-sdk.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,26 @@ It is generally recommended to initialize globally the library at the top of you
5353

5454
## Configuration
5555

56-
Juno uses a configuration file to determine which Satellite to connect to. Scaffold a minimal config file using:
56+
Juno uses a configuration file to determine which Satellite to connect to.
57+
58+
You can scaffold a minimal `juno.config` file using:
5759

5860
```bash
5961
npx @junobuild/cli init --minimal
6062
```
6163

62-
This creates a `juno.config` file — in TypeScript, JavaScript, or JSON depending on your preferences — at the root of your project.
64+
This creates a `juno.config` file — in TypeScript, JavaScript, or JSON depending on your preferences — at the root of your project. It contains metadata such as the Satellite ID used during SDK initialization.
65+
66+
If you're using **Next.js** or **Vite**, we recommend installing the official plugin. It automatically loads values from your config file and injects them into your build as environment variables.
6367

64-
From there, if you're using **Next.js** or **Vite**, install the official plugin. It reads your config file and injects environment variables automatically for the SDK — no need to pass anything manually.
68+
This means you can call `initSatellite()` without passing any parameters, the SDK will read them automatically from `process.env` or `import.meta.env`.
6569

6670
- [Next.js Plugin](reference/plugins.mdx#nextjs-plugin)
6771

6872
```javascript title="next.config.js"
6973
import { withJuno } from "@junobuild/nextjs-plugin";
7074

75+
// withJuno wraps your Next.js config and injects values from juno.config
7176
export default withJuno();
7277
```
7378

@@ -76,6 +81,7 @@ export default withJuno();
7681
```javascript title="vite.config.js"
7782
import juno from "@junobuild/vite-plugin";
7883

84+
// Automatically injects values from juno.config for the build
7985
export default defineConfig({
8086
plugins: [juno()]
8187
});

0 commit comments

Comments
 (0)