We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
main.ts
1 parent 9bce4c4 commit 9107deaCopy full SHA for 9107dea
packages/schematics/angular/migrations/use-application-builder/migration.ts
@@ -151,7 +151,10 @@ function* updateBuildTarget(
151
// Update server file
152
const ssrMainFile = serverTarget?.options?.['main'];
153
if (typeof ssrMainFile === 'string') {
154
- yield deleteFile(ssrMainFile);
+ // Do not delete the server main file if it's the same as the browser file.
155
+ if (buildTarget.options?.browser !== ssrMainFile) {
156
+ yield deleteFile(ssrMainFile);
157
+ }
158
159
yield externalSchematic('@schematics/angular', 'ssr', {
160
project: projectName,
0 commit comments