mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-06 12:57:46 +00:00
[next] Ensure manifests are specific to the included pages (#8172)
### Related Issues
This updates to filter the `routes-manifest` and `pages-manifest` to only include entries for the pages that are being included in the specific serverless function. This fixes the case where multiple dynamic routes could match a path but one is configured with `fallback: false` so shouldn't match when executing for a different dynamic route.
A regression test for this specific scenario has been added in the `00-mixed-dynamic-routes` fixture.
### 📋 Checklist
<!--
Please keep your PR as a Draft until the checklist is complete
-->
#### Tests
- [ ] The code changed/added as part of this PR has been covered with tests
- [ ] All tests pass locally with `yarn test-unit`
#### Code Review
- [ ] This PR has a concise title and thorough description useful to a reviewer
- [ ] Issue from task tracker has a link to this PR
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const fs = require('fs-extra');
|
||||
const { glob, getWriteableDirectory } = require('@vercel/build-utils');
|
||||
const { glob } = require('@vercel/build-utils');
|
||||
|
||||
function runAnalyze(wrapper, context) {
|
||||
if (wrapper.analyze) {
|
||||
@@ -37,7 +39,13 @@ async function runBuildLambda(inputPath) {
|
||||
config: build.config,
|
||||
});
|
||||
|
||||
const workPath = await fs.realpath(await getWriteableDirectory());
|
||||
const workPath = path.join(
|
||||
os.tmpdir(),
|
||||
`vercel-${Date.now()}-${Math.floor(Math.random() * 100)}`
|
||||
);
|
||||
await fs.ensureDir(workPath);
|
||||
console.log('building in', workPath);
|
||||
|
||||
const buildResult = await wrapper.build({
|
||||
files: inputFiles,
|
||||
entrypoint,
|
||||
|
||||
Reference in New Issue
Block a user