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
28 changes: 14 additions & 14 deletions demos/turbopack-next15/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
"lint": "next lint"
},
"dependencies": {
"react": "19.1.0",
"react-dom": "19.1.0",
"next": "15.4.4"
"next": "15.5.3",
"react": "19.1.1",
"react-dom": "19.1.1"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@tailwindcss/postcss": "^4",
"tailwindcss": "^4",
"eslint": "^9",
"eslint-config-next": "15.4.4",
"@eslint/eslintrc": "^3",
"@eslint/eslintrc": "^3.3.1",
"@mdx-js/loader": "^3.1.1",
"@next/mdx": "15.5.3",
"@tailwindcss/postcss": "^4.1.13",
"@types/node": "^24.3.1",
"@types/react": "^19.1.12",
"@types/react-dom": "^19.1.9",
"code-inspector-plugin": "workspace:^",
"@next/mdx": "15.4.4",
"@mdx-js/loader": "^3.1.0"
"eslint": "^9.35.0",
"eslint-config-next": "15.5.3",
"tailwindcss": "^4.1.13",
"typescript": "^5.9.2"
}
}
15 changes: 15 additions & 0 deletions demos/turbopack-next15/src/middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Middleware file to verify turbopack compatibility
//
// ⚠️ This file should be REMOVED once Turbopack fixes the middleware issue ⚠️
//
// With the improved pattern '**/app/**/*.{jsx,tsx,js,ts,mjs,mts}' in the turbopack plugin,
// code-inspector only processes files in app directories, naturally excluding middleware files.
// This prevents the Turbopack crash issue by default.
//
// This is still a workaround. Track the issues for removal:
// - https://github.com/vercel/next.js/issues/79592
// - https://github.com/zh-lx/code-inspector/issues/357

export function middleware() {
// Empty middleware - its presence is enough to test the workaround
}
2 changes: 1 addition & 1 deletion packages/turbopack/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function TurbopackCodeInspectorPlugin(
const WebpackDistDir = path.resolve(WebpackEntry, '..');

return {
'**/*.{jsx,tsx,js,ts,mjs,mts}': {
'**/app/**/*.{jsx,tsx,js,ts,mjs,mts}': {
loaders: [
{
loader: `${WebpackDistDir}/loader.js`,
Expand Down