fix(nextjs): src package.json should not be copied to output folder

closes: #21535
This commit is contained in:
Nicholas Cunningham 2024-02-07 16:16:39 -07:00 committed by Miroslav Jonaš
parent 202f141778
commit aa622bab5a

View File

@ -77,12 +77,15 @@ export function createNextConfigFile(
);
for (const moduleFile of moduleFilesToCopy) {
ensureDirSync(dirname(join(context.root, options.outputPath, moduleFile)));
// We already generate a build version of package.json in the dist folder.
if (moduleFile !== 'package.json') {
copyFileSync(
join(context.root, projectRoot, moduleFile),
join(context.root, options.outputPath, moduleFile)
);
}
}
}
function readSource(getFile: () => string): { file: string; content: string } {
return {