We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alpha
npm
Mac
middleware.ts and middleware.js in the root of the project are not ran
Middleware should be executed on api routes.
npx create-next-app --example with-turbopack
console.log({ middleWare: true}) import { NextResponse } from "next/server"; export default (req) => { return NextResponse.next(); }; // Stop Middleware running on static files export const config = { matcher: '/((?!.*\\.).*)' }
npm run dev
{ middleWare: true } does not exist in the output
{ middleWare: true }
npx next dev { middleWare: true } exists in the output
npx next dev
No response
The text was updated successfully, but these errors were encountered:
Closing since it duplicates: vercel/next.js#42921
Sorry, something went wrong.
No branches or pull requests
What version of Turbopack are you using?
alpha
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Describe the Bug
middleware.ts and middleware.js in the root of the project are not ran
Expected Behavior
Middleware should be executed on api routes.
To Reproduce
create turbopack app
npx create-next-app --example with-turbopack
create a middleware file (middleware.js) with the following contents:
start next
npm run dev
observe turbopack does not load the file
{ middleWare: true }
does not exist in the outputobserve omitting turbopack loads the file
npx next dev
{ middleWare: true }
exists in the outputReproduction Repo
No response
The text was updated successfully, but these errors were encountered: