Skip to content
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
52 changes: 3 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ Start your dev server and access the Asset Manager in three ways:

### Nuxt Module

For Nuxt 3/4 projects, use the official module for automatic integration:

```bash
npm install @vite-asset-manager/nuxt -D
```
Expand All @@ -106,70 +104,26 @@ export default defineNuxtConfig({
})
```

Features:
- Automatic floating icon injection (no manual setup)
- Nuxt DevTools integration
- Supports Nuxt 3 and 4 directory structures
- Dev-only (zero production footprint)
Zero-config with automatic floating icon injection, Nuxt DevTools integration, and Nuxt 3/4 support. See the **[full Nuxt documentation](https://www.npmjs.com/package/@vite-asset-manager/nuxt)** for all options.

### Next.js Integration

For Next.js 14+ projects, use the official integration package:

```bash
npm install nextjs-asset-manager -D
```

**Step 1:** Wrap your Next.js config to suppress dev server request logging:

```ts
// next.config.ts
import type { NextConfig } from "next"
import { withAssetManager } from "nextjs-asset-manager"

const nextConfig: NextConfig = {}
export default withAssetManager(nextConfig)
```

**Step 2:** Create an API catch-all route:

```ts
// app/api/asset-manager/[[...path]]/route.ts
import { createHandler } from 'nextjs-asset-manager'

const { GET, POST } = createHandler()
export { GET, POST }
```

**Step 3:** Add the client component to your root layout:

```tsx
// app/layout.tsx
import { AssetManagerScript } from 'nextjs-asset-manager'

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<AssetManagerScript />
</body>
</html>
)
}
```

Features:
- Dev-only (returns 404 in production)
- Automatic floating icon injection via client component
- Suppresses asset manager request logging in dev server
- Default base path: `/api/asset-manager`
- Singleton management for HMR stability
- Composable with other `withX` plugins (`withSentryConfig`, `withBundleAnalyzer`, etc.)
Three-step setup: wrap config, add route handler, add client component. See the **[full Next.js documentation](https://www.npmjs.com/package/nextjs-asset-manager)** for all options.

### Other SSR Frameworks

For SSR frameworks (Remix, SvelteKit, Solid Start), manual script injection is required. See the **[SSR Integration Guide](./docs/SSR_INTEGRATION.md)** for setup instructions.
For TanStack Start, Remix, SvelteKit, and Solid Start, manual script injection is required. See the **[SSR Integration Guide](./docs/SSR_INTEGRATION.md)** for setup instructions.

## Configuration

Expand Down
Loading
Loading