Skip to content

🎥 Make videos programmatically with React

docs: Add dynamic-compilation to sidebar and fix twoslash errors

ASchwad72b451b38ea1
diff --git a/packages/docs/docs/ai/dynamic-compilation.mdx b/packages/docs/docs/ai/dynamic-compilation.mdx
index 77554d92b0..2e7a8ad3b9 100644
--- a/packages/docs/docs/ai/dynamic-compilation.mdx
+++ b/packages/docs/docs/ai/dynamic-compilation.mdx
@@ -12,7 +12,7 @@ This guide shows how to take Remotion code (a string) and compile it in the brow
## The Goal
-When thinking of a Lovable for Animations and Motion Graphics, user will submit their prompt, receive AI-generated code and then the users want to see their animation. Building a sandboxing environment for these snippets is an option, but also quite an overhead for previewing a single React Component.
+When building a Lovable-style tool for animations and motion graphics, users submit a prompt, receive AI-generated code, and want to see their animation immediately. Building a sandboxing environment is an option, but it adds overhead for previewing a single React component.
In this guide, you will learn how to leverage dynamic compilation of the code right within the browser to get a Remotion Preview of the component.
@@ -33,7 +33,7 @@ export const MyComposition = () => {
`;
```
-If we think of the compilation as just a hook, the usage looks like this:
+Thinking of the compilation as just a hook, the usage looks like this:
```tsx
import {Player} from '@remotion/player';
@@ -46,7 +46,7 @@ export const Preview: React.FC<{code: string}> = ({code}) => {
};
```
-The rest of this page will go into detail what we will need to do behind the scenes to get a hook like `useCompilation` to work.
+The rest of this page explains what happens behind the scenes to make a hook like `useCompilation` work.
## Installation
@@ -60,13 +60,13 @@ npm install @babel/standalone remotion @remotion/player
- Strips TypeScript type annotations so the code can run as plain JavaScript
- No build server or bundler required - everything happens client-side
-**How is this different from normal React development?**
+## What Does Compilation Mean?
During typical development, your code exists as files on disk. When you run `npm run dev`, Vite or Webpack runs a dev server that reads those files, transforms JSX/TypeScript, and serves the compiled JavaScript to your browser. Similarly, `npm run build` pre-compiles everything into static files that can be deployed. In both cases, the transformation happens before the browser ever sees the code.
-With AI-generated code, there are no files - the code is created dynamically in response to a user prompt. By the time it exists, we're already in the browser. So we need Babel to run client-side to do the same JSX/TypeScript transformation that would normally happen during dev or build.
+With AI-generated code, there are no files - the code is created dynamically in response to a user prompt. By the time it exists, you're already in the browser. So Babel needs to run client-side to do the same JSX/TypeScript transformation that would normally happen during dev or build.
-**Example: What does Babel output?**
+**Example: What is the Babel output?**
Before (JSX + TypeScript):
@@ -84,406 +84,261 @@ const MyComponent = () => {
};
```
-The JSX syntax is converted to `React.createElement()` calls, and type annotations are stripped. This is what browsers can actually execute.
+The JSX syntax is converted to `React.createElement()` calls, and type annotations are stripped. This is valid JavaScript that browsers can understand - but the string still needs to be turned into actual executable code.
-## Basic Compilation
+## The Core Idea
-Here's a minimal `compileCode` function that takes a code string and returns a React component:
+Let's start with the simplest possible case - a component with no imports, just pure JSX:
-```tsx twoslash title="compile-code.ts"
-import * as Babel from '@babel/standalone';
-import React from 'react';
-import {AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate, Sequence} from 'remotion';
+```tsx
+const code = `
+const MyComponent = () => {
+ return <div style={{fontSize: 100}}>Hello</div>;
+};
+`;
+```
-interface CompilationResult {
- Component: React.ComponentType | null;
- error: string | null;
-}
+To make this executable, two steps are required:
-export function compileCode(code: string): CompilationResult {
- if (!code?.trim()) {
- return {Component: null, error: 'No code provided'};
- }
+**Step 1: Transpile JSX with Babel**
+
+```tsx
+import * as Babel from '@babel/standalone';
- try {
- // Step 1: Strip imports (we inject APIs manually)
- const codeWithoutImports = code.replace(/^import\s+.*$/gm, '').trim();
+const transpiled = Babel.transform(code, {
+ presets: ['react', 'typescript'],
+});
- // Step 2: Extract the component body
- // Handles: export const MyComposition = () => { ... };
- const match = codeWithoutImports.match(/export\s+const\s+\w+\s*=\s*\(\s*\)\s*=>\s*\{([\s\S]*)\};?\s*$/);
- const componentBody = match ? match[1].trim() : codeWithoutImports;
+// Result: const MyComponent = () => { return React.createElement("div", ...); };
+```
- // Step 3: Wrap in a component function
- const wrappedSource = `const DynamicComponent = () => {\n${componentBody}\n};`;
+**Step 2: Execute the code and extract the component**
- // Step 4: Transpile JSX/TypeScript to JavaScript
- const transpiled = Babel.transform(wrappedSource, {
- presets: ['react', 'typescript'],
- filename: 'dynamic.tsx',
- });
+After transpilation, the result is this string:
- if (!transpiled.code) {
- return {Component: null, error: 'Transpilation failed'};
- }
+```js
+'const MyComponent = () => { return React.createElement("div", {style: {fontSize: 100}}, "Hello"); };';
+```
- // Step 5: Create the component using Function constructor
- // This injects Remotion APIs as available variables
- const createComponent = new Function('React', 'AbsoluteFill', 'useCurrentFrame', 'useVideoConfig', 'spring', 'interpolate', 'Sequence', `${transpiled.code}\nreturn DynamicComponent;`);
+But it's still just a string - not executable code. JavaScript's `Function` constructor turns it into a real function:
- const Component = createComponent(React, AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate, Sequence);
+```tsx
+const createComponent = new Function(
+ 'React', // Parameter: React will be available inside
+ `${transpiled.code}\nreturn MyComponent;`, // Body: define component, then return it
+);
+```
- if (typeof Component !== 'function') {
- return {Component: null, error: 'Compilation did not produce a valid component'};
- }
+This creates a function equivalent to:
- return {Component, error: null};
- } catch (error) {
- return {
- Component: null,
- error: error instanceof Error ? error.message : 'Unknown compilation error',
- };
- }
+```tsx
+function createComponent(React) {
+ const MyComponent = () => { return React.createElement("div", ...); };
+ return MyComponent;
}
```
-## Using the Compiled Component
+Calling this function and passing the actual React library makes the component available. The component code is wrapped inside, and dependencies (in this case just React) are passed in as arguments.
-Once you have a compiled component, pass it to the Remotion Player:
-
-```tsx twoslash title="DynamicPlayer.tsx"
-// @noErrors
-import {Player} from '@remotion/player';
-import {useState, useEffect} from 'react';
-import {compileCode} from './compile-code';
+```tsx
+const Component = createComponent(React);
+// Component is now a real React component we can render!
+```
-interface DynamicPlayerProps {
- code: string;
- durationInFrames?: number;
- fps?: number;
-}
+<details>
+<summary>That was too fast/shallow, how does it work exactly?</summary>
-export const DynamicPlayer: React.FC<DynamicPlayerProps> = ({code, durationInFrames = 150, fps = 30}) => {
- const [Component, setComponent] = useState<React.ComponentType | null>(null);
- const [error, setError] = useState<string | null>(null);
-
- useEffect(() => {
- const result = compileCode(code);
- if (result.error) {
- setError(result.error);
- setComponent(null);
- } else {
- setComponent(() => result.Component);
- setError(null);
- }
- }, [code]);
+The `Function` constructor in JavaScript creates a new function from strings. The syntax is:
- if (error) {
- return (
- <div style={{color: 'red', padding: 20}}>
- <strong>Compilation Error:</strong> {error}
- </div>
- );
- }
+```tsx
+new Function(param1, param2, ..., functionBody)
+```
- if (!Component) {
- return <div>Loading...</div>;
- }
+A simple example:
- return <Player component={Component} durationInFrames={durationInFrames} fps={fps} compositionWidth={1920} compositionHeight={1080} style={{width: '100%'}} controls />;
-};
+```tsx
+const add = new Function('a', 'b', 'return a + b;');
+add(2, 3); // Returns 5
```
-## Full Example
+The first arguments become parameter names, and the last argument is the function body as a string.
-Putting it all together:
+For this use case:
-```tsx twoslash title="App.tsx"
-// @noErrors
-import {DynamicPlayer} from './DynamicPlayer';
+- `'React'` is passed as a parameter name, so `React` becomes available inside the function body
+- The function body contains the transpiled component code plus `return MyComponent;`
+- When `createComponent(React)` is called, the actual React library gets bound to the `React` variable
-const generatedCode = `
-import { useCurrentFrame, AbsoluteFill, spring, useVideoConfig } from "remotion";
+The key insight: `React` inside the transpiled code refers to whatever we pass in when calling the function.
-export const MyComposition = () => {
- const frame = useCurrentFrame();
- const { fps } = useVideoConfig();
+</details>
- const scale = spring({
- frame,
- fps,
- config: { damping: 10, stiffness: 100 },
- });
+## Adding Remotion APIs
- return (
- <AbsoluteFill style={{
- backgroundColor: "#0f0f0f",
- justifyContent: "center",
- alignItems: "center"
- }}>
- <div style={{
- fontSize: 120,
- color: "white",
- transform: \`scale(\${scale})\`
- }}>
- Hello World
- </div>
- </AbsoluteFill>
- );
-};
-`;
+Just React won't be enough for animations. Remotion components need access to APIs like `useCurrentFrame` and `AbsoluteFill`. These are injected the same way.
-export default function App() {
- return <DynamicPlayer code={generatedCode} durationInFrames={90} fps={30} />;
-}
-```
+:::info
+To make in-browser dynamic compilation work, all libraries used within the animation code must be passed in. Since not all of them are known upfront, you can provide a broad range of libraries to support most use cases.
+:::
-## Understanding the Compilation Steps
+Think of it like the following - this is just a handful, but it gives you the right idea:
-### 1. Strip Imports
+```tsx
+import {AbsoluteFill, useCurrentFrame, spring} from 'remotion';
-AI-generated code typically includes import statements:
+const createComponent = new Function('React', 'AbsoluteFill', 'useCurrentFrame', 'spring', `${transpiled.code}\nreturn MyComponent;`);
-```ts
-import {useCurrentFrame, AbsoluteFill} from 'remotion';
+const Component = createComponent(React, AbsoluteFill, useCurrentFrame, spring);
```
-Since we inject these APIs manually via the Function constructor, we remove imports:
+Each parameter name becomes an available variable inside the executed code.
-```ts
-const codeWithoutImports = code.replace(/^import\s+.*$/gm, '').trim();
-```
+## Handling Import Statements
-### 2. Extract Component Body
+AI-generated code typically includes import statements. Since APIs are injected manually via the Function constructor, these imports need to be stripped:
-The generated code exports a component. We need to extract just the function body:
+```tsx
+// AI generates this:
+import {useCurrentFrame, AbsoluteFill} from 'remotion';
-```ts
-// From this:
export const MyComposition = () => {
const frame = useCurrentFrame();
- return <div>{frame}</div>;
+ return <AbsoluteFill>...</AbsoluteFill>;
};
-
-// To this:
-const frame = useCurrentFrame();
-return <div>{frame}</div>;
```
-### 3. Babel Transpilation
+The imports are removed and just the component body is extracted:
-`@babel/standalone` converts JSX and TypeScript to plain JavaScript that browsers can execute:
+```tsx
+// Step 1: Remove imports (these are injected manually)
+const codeWithoutImports = code.replace(/^import\s+.*$/gm, '').trim();
-```ts
-const transpiled = Babel.transform(wrappedSource, {
- presets: ['react', 'typescript'],
- filename: 'dynamic.tsx',
-});
+// Step 2: Extract component body from "export const X = () => { ... };"
+const match = codeWithoutImports.match(/export\s+const\s+\w+\s*=\s*\(\s*\)\s*=>\s*\{([\s\S]*)\};?\s*$/);
+const componentBody = match ? match[1].trim() : codeWithoutImports;
+
+// Step 3: Wrap it back into a component
+const wrappedSource = `const DynamicComponent = () => {\n${componentBody}\n};`;
```
-The `react` preset handles JSX, and `typescript` handles type annotations.
+## Complete Implementation
-### 4. API Injection via Function Constructor
+<Tabs>
+<TabItem value="preview" label="Preview.tsx">
-The key technique is using JavaScript's `Function` constructor to create a function with specific variables in scope:
+```tsx twoslash title="Preview.tsx"
+// @noErrors
+import {Player} from '@remotion/player';
+import {useCompilation} from './useCompilation';
-```ts
-const createComponent = new Function(
- 'React', // Parameter 1
- 'useCurrentFrame', // Parameter 2
- 'AbsoluteFill', // Parameter 3
- // ... more parameters
- `${transpiled.code}\nreturn DynamicComponent;`, // Function body
-);
-```
+export const Preview: React.FC<{code: string}> = ({code}) => {
+ const {Component, error} = useCompilation(code);
-When called with the actual values, these become available inside the generated code:
+ if (error) {
+ return <div style={{color: 'red'}}>Error: {error}</div>;
+ }
-```ts
-const Component = createComponent(
- React, // Value for parameter 1
- useCurrentFrame, // Value for parameter 2
- AbsoluteFill, // Value for parameter 3
- // ... more values
-);
-```
+ if (!Component) {
+ return null;
+ }
-## Extending with More APIs
+ return <Player component={Component} durationInFrames={150} fps={30} compositionWidth={1920} compositionHeight={1080} controls />;
+};
+```
-To support more Remotion features, add them to both the Function parameters and arguments:
+</TabItem>
+<TabItem value="hook" label="useCompilation.ts" default>
-```tsx twoslash title="compile-code-extended.ts"
-// @noErrors
+```tsx twoslash title="useCompilation.ts"
import * as Babel from '@babel/standalone';
-import React, {useState, useEffect, useMemo, useRef} from 'react';
-import {AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate, interpolateColors, Easing, Sequence, Series, Img, Audio, Video, OffthreadVideo} from 'remotion';
-import * as RemotionShapes from '@remotion/shapes';
-import {TransitionSeries, linearTiming, springTiming} from '@remotion/transitions';
-import {fade} from '@remotion/transitions/fade';
-import {slide} from '@remotion/transitions/slide';
-
-export function compileCode(code: string) {
- // ... same setup code ...
-
- const createComponent = new Function(
- // React
- 'React',
- 'useState',
- 'useEffect',
- 'useMemo',
- 'useRef',
- // Core Remotion
- 'AbsoluteFill',
- 'useCurrentFrame',
- 'useVideoConfig',
- 'spring',
- 'interpolate',
- 'interpolateColors',
- 'Easing',
- 'Sequence',
- 'Series',
- 'Img',
- 'Audio',
- 'Video',
- 'OffthreadVideo',
- // Shapes
- 'Rect',
- 'Circle',
- 'Triangle',
- 'Star',
- 'Ellipse',
- // Transitions
- 'TransitionSeries',
- 'linearTiming',
- 'springTiming',
- 'fade',
- 'slide',
- // The code
- `${transpiled.code}\nreturn DynamicComponent;`,
- );
-
- const Component = createComponent(
- React,
- useState,
- useEffect,
- useMemo,
- useRef,
- AbsoluteFill,
- useCurrentFrame,
- useVideoConfig,
- spring,
- interpolate,
- interpolateColors,
- Easing,
- Sequence,
- Series,
- Img,
- Audio,
- Video,
- OffthreadVideo,
- RemotionShapes.Rect,
- RemotionShapes.Circle,
- RemotionShapes.Triangle,
- RemotionShapes.Star,
- RemotionShapes.Ellipse,
- TransitionSeries,
- linearTiming,
- springTiming,
- fade,
- slide,
- );
+import React, {useMemo} from 'react';
+import {AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate, Sequence} from 'remotion';
- // ... rest of the function
+interface CompilationResult {
+ Component: React.ComponentType | null;
+ error: string | null;
}
-```
-
-## Error Handling
-
-Wrap the Player with an error boundary to catch runtime errors:
-```tsx twoslash title="PlayerWithErrorBoundary.tsx"
-// @noErrors
-import {Player, type ErrorFallback} from '@remotion/player';
-
-const errorFallback: ErrorFallback = ({error}) => (
- <div
- style={{
- display: 'flex',
- justifyContent: 'center',
- alignItems: 'center',
- height: '100%',
- backgroundColor: '#1a1a1a',
- color: '#ff6b6b',
- padding: 20,
- }}
- >
- <div style={{textAlign: 'center'}}>
- <h3>Runtime Error</h3>
- <pre style={{color: '#fff', fontSize: 14}}>{error.message}</pre>
- </div>
- </div>
-);
+export function useCompilation(code: string): CompilationResult {
+ return useMemo(() => {
+ if (!code?.trim()) {
+ return {Component: null, error: null};
+ }
-<Player component={Component} durationInFrames={150} fps={30} compositionWidth={1920} compositionHeight={1080} errorFallback={errorFallback} />;
+ try {
+ // Strip imports and extract component body
+ const codeWithoutImports = code.replace(/^import\s+.*$/gm, '').trim();
+ const match = codeWithoutImports.match(/export\s+const\s+\w+\s*=\s*\(\s*\)\s*=>\s*\{([\s\S]*)\};?\s*$/);
+ const componentBody = match ? match[1].trim() : codeWithoutImports;
+ const wrappedSource = `const DynamicComponent = () => {\n${componentBody}\n};`;
+
+ // Transpile JSX/TypeScript
+ const transpiled = Babel.transform(wrappedSource, {
+ presets: ['react', 'typescript'],
+ filename: 'dynamic.tsx',
+ });
+
+ if (!transpiled.code) {
+ return {Component: null, error: 'Transpilation failed'};
+ }
+
+ // Create component with injected APIs
+ const createComponent = new Function('React', 'AbsoluteFill', 'useCurrentFrame', 'useVideoConfig', 'spring', 'interpolate', 'Sequence', `${transpiled.code}\nreturn DynamicComponent;`);
+
+ const Component = createComponent(React, AbsoluteFill, useCurrentFrame, useVideoConfig, spring, interpolate, Sequence);
+
+ return {Component, error: null};
+ } catch (error) {
+ return {
+ Component: null,
+ error: error instanceof Error ? error.message : 'Unknown compilation error',
+ };
+ }
+ }, [code]);
+}
```
-There are three types of errors to handle:
-
-1. **Syntax errors** - Babel fails to parse the code
-2. **Compilation errors** - The Function constructor fails
-3. **Runtime errors** - The component throws during rendering
-
-The `compileCode` function catches the first two. The Player's `errorFallback` prop handles the third.
+</TabItem>
+<TabItem value="generated" label="AI-Generated Code">
-## React Hook: useCompilation
+```ts title="Example AI Output"
+const generatedCode = `import {useCurrentFrame, AbsoluteFill, spring, useVideoConfig} from 'remotion';
-For a cleaner React integration, create a custom hook:
+export const MyComposition = () => {
+ const frame = useCurrentFrame();
+ const {fps} = useVideoConfig();
-```tsx twoslash title="useCompilation.ts"
-// @noErrors
-import {useState, useEffect, useCallback} from 'react';
-import {compileCode, type CompilationResult} from './compile-code';
-
-export function useCompilation(initialCode: string = '') {
- const [code, setCode] = useState(initialCode);
- const [result, setResult] = useState<CompilationResult>({
- Component: null,
- error: null,
+ const scale = spring({
+ frame,
+ fps,
+ config: {damping: 10, stiffness: 100},
});
- const [isCompiling, setIsCompiling] = useState(false);
-
- const compile = useCallback((codeToCompile: string) => {
- setIsCompiling(true);
- const compilationResult = compileCode(codeToCompile);
- setResult(compilationResult);
- setIsCompiling(false);
- }, []);
-
- // Auto-compile on code change with debounce
- useEffect(() => {
- const timeout = setTimeout(() => {
- if (code) compile(code);
- }, 300);
- return () => clearTimeout(timeout);
- }, [code, compile]);
-
- return {
- code,
- setCode,
- Component: result.Component,
- error: result.error,
- isCompiling,
- compile,
- };
-}
-```
-
-Usage:
-```tsx
-const {code, setCode, Component, error, isCompiling} = useCompilation(initialCode);
+ return (
+ <AbsoluteFill
+ style={{
+ backgroundColor: '#0f0f0f',
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}
+ >
+ <div
+ style={{
+ fontSize: 120,
+ color: 'white',
+ transform: \`scale(\${scale})\`,
+ }}
+ >
+ Hello World
+ </div>
+ </AbsoluteFill>
+ );
+};`;
```
+</TabItem>
+</Tabs>
+
## Security Considerations
Dynamic code execution carries inherent risks. The AI-generated code runs with full access to the browser context.
@@ -495,16 +350,14 @@ For production applications, consider:
- **Content Security Policy** - Restrict what the generated code can access
- **Code validation** - Check for potentially harmful patterns before compilation
-## Template
+## See Also
-For a production-ready implementation with validation, streaming, skill detection and more, see the [Prompt to Motion Graphics template](https://github.com/remotion-dev/remotion/tree/main/packages/template-prompt-to-motion-graphics):
+For a ready for use implementation of the Dynamic Compilation and more, see the [Prompt to Motion Graphics template](https://github.com/remotion-dev/remotion/tree/main/packages/template-prompt-to-motion-graphics):
```bash
npx create-video@latest --prompt-to-motion-graphics
```
-## See Also
-
- [Code Generation](/docs/ai/generate) - How to generate Remotion code with AI
- [Player](/docs/player) - Remotion Player documentation
- [System Prompt](/docs/ai/system-prompt) - Teaching LLMs about Remotion
diff --git a/packages/docs/docs/ai/generate.mdx b/packages/docs/docs/ai/generate.mdx
index 526b9e221b..784190f21f 100644
--- a/packages/docs/docs/ai/generate.mdx
+++ b/packages/docs/docs/ai/generate.mdx
@@ -19,7 +19,7 @@ The AI SDK makes switching between LLM providers easy and provides a unified int
This simple system prompt here instructs the model in basic terms what the request is about and what the model's purpose is. This prompt relies completely on the training of the model about Remotion. Not ideal but great for a simple start.
-```ts twoslash title="generate.ts"
+```ts title="generate.ts"
import {generateText} from 'ai';
import {openai} from '@ai-sdk/openai';
@@ -62,7 +62,7 @@ Having more properties and metadata around the code you generated is beneficial.
Most bigger LLM providers offer a structured output mode for their endpoints by now, so you can define exactly which properties you are expecting. For more control over the output, use `generateText` with the `output` property to get structured output with validation. Often this is enough for the model to understand that you actually expect stringified code for the code property, but you can still add one more note about it in the system prompt.
-```ts twoslash title="generate-structured.ts"
+```ts title="generate-structured.ts"
import {generateText, Output} from 'ai';
import {openai} from '@ai-sdk/openai';
import {z} from 'zod';
@@ -132,7 +132,7 @@ See the [Agent Skills documentation](/docs/ai/skills) for more details.
Here's a minimal example of how skill detection works:
-```ts twoslash title="skill-detection.ts"
+```ts title="skill-detection.ts"
import {generateText, Output} from 'ai';
import {openai} from '@ai-sdk/openai';
import {z} from 'zod';
@@ -176,7 +176,7 @@ const {output} = await generateText({
Now what can you even do with this component code? Could be a first draft for an animation that you would like to use in your software or an inspiration to learn other ways to use the Remotion APIs.
Making it easy to see this generated component code is important. But you need to compile and render it. The [next guide](/docs/ai/dynamic-compilation) will show how to turn this code string into a live preview right within your browser.
-## Template
+## See Also
For an remotion code generation implementation with validation, skill detection, streaming and more, see the [Prompt to Motion Graphics template](https://github.com/remotion-dev/remotion/tree/main/packages/template-prompt-to-motion-graphics):
@@ -184,8 +184,6 @@ For an remotion code generation implementation with validation, skill detection,
npx create-video@latest --prompt-to-motion-graphics
```
-## See Also
-
- [Dynamic Compilation](/docs/ai/dynamic-compilation)
- [System Prompt](/docs/ai/system-prompt) - The full system prompt for teaching LLMs Remotion
- [Agent Skills](/docs/ai/skills) - Modular knowledge units for AI coding assistants
diff --git a/packages/docs/sidebars.ts b/packages/docs/sidebars.ts
index 70e3a0c65c..21523bbae0 100644
--- a/packages/docs/sidebars.ts
+++ b/packages/docs/sidebars.ts
@@ -1175,6 +1175,7 @@ const sidebars: SidebarsConfig = {
'ai/bolt',
'ai/chatbot',
'ai/generate',
+ 'ai/dynamic-compilation',
'ai/mcp',
'ai/system-prompt',
'ai/skills',