Skip to content

Commit 6e2241a

Browse files
fix(nx-plugin): add fallback for json.files property in preset
1 parent 44080b1 commit 6e2241a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/nx-plugin/src/generators/init/lib/update-app-tsconfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export function updateAppTsConfig(
2525
tree,
2626
tsconfigPath,
2727
(json) => {
28-
json.files = [...json.files, 'src/main.server.ts'];
28+
json.files = [...(json.files || []), 'src/main.server.ts'];
2929

3030
json.include = [
31-
...json.include,
31+
...(json.include || []),
3232
'src/app/pages/**/*.page.ts',
3333
'src/server/middleware/**/*.ts',
3434
];

0 commit comments

Comments
 (0)