Skip to content

Commit a62b608

Browse files
committed
docs: update Next.js documentation to reflect Webpack and Turbopack support
1 parent f67f6be commit a62b608

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<img src="./assets/logo.svg" alt="DevInspector Logo" width="200" height="200" />
2+
<img src="./assets/logo.svg" alt="DevInspector Logo" width="50" height="50" />
33
</p>
44

55
# @mcpc-tech/unplugin-dev-inspector-mcp
@@ -190,11 +190,14 @@ module.exports = {
190190

191191
### Next.js
192192

193+
Next.js supports **both Webpack and Turbopack** modes:
194+
193195
```diff
194196
// next.config.ts
195-
+import DevInspector from '@mcpc-tech/unplugin-dev-inspector-mcp';
197+
+import DevInspector, { turbopackDevInspector } from '@mcpc-tech/unplugin-dev-inspector-mcp';
196198

197199
const nextConfig: NextConfig = {
200+
+ // Webpack configuration (default mode: `next dev`)
198201
+ webpack: (config) => {
199202
+ config.plugins.push(
200203
+ DevInspector.webpack({
@@ -203,6 +206,13 @@ const nextConfig: NextConfig = {
203206
+ );
204207
+ return config;
205208
+ },
209+
+
210+
+ // Turbopack configuration (`next dev --turbopack`)
211+
+ turbopack: {
212+
+ rules: turbopackDevInspector({
213+
+ enabled: true,
214+
+ }),
215+
+ },
206216
};
207217

208218
export default nextConfig;
@@ -226,7 +236,9 @@ export default function RootLayout({ children }) {
226236
}
227237
```
228238

229-
> 💡 **Note:** Webpack and Next.js use a standalone server on port 8888. Run `next dev --webpack` for Webpack mode (Next.js 16+ defaults to Turbopack).
239+
**Running modes:**
240+
- **Webpack mode:** `next dev` (uses webpack configuration)
241+
- **Turbopack mode:** `next dev --turbopack` (uses turbopack configuration, Next.js 16+ default)
230242

231243
## Framework Support
232244

@@ -237,7 +249,7 @@ export default function RootLayout({ children }) {
237249
- **Svelte** - `.svelte` components (Vite, Webpack)
238250
- **SolidJS** - `.jsx` and `.tsx` files (Vite, Webpack)
239251
- **Preact** - `.jsx` and `.tsx` files (Vite, Webpack)
240-
- **Next.js** - React with Webpack mode
252+
- **Next.js** - React with Webpack and Turbopack modes
241253

242254
### 🚧 In Progress
243255

0 commit comments

Comments
 (0)