Unverified Commit 3fc9b662 authored by khuezy's avatar khuezy Committed by GitHub

fix: add appDir path to middleware output path (#75923)

### What?
Add `appDir` path to middleware output path for `nodeMiddleware`
experimental feature
### Why?
For monorepos, the `appDir` is required to copy the `middleware.js` file
to the correct path.

### How?

Add `path.relative(outputFileTracingRoot, distDir),` to the `path.join`
list.

---------
Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent da9a9ffb
......@@ -644,7 +644,7 @@ async function writeStandaloneDirectory(
const middlewareOutput = path.join(
distDir,
STANDALONE_DIRECTORY,
requiredServerFiles.config.distDir,
path.relative(outputFileTracingRoot, distDir),
SERVER_DIRECTORY,
'middleware.js'
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment