Skip to content

Reference to tsconfig.spec.json created in new app with --minimal flag #30181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
Wartijn opened this issue Apr 25, 2025 · 1 comment
Open
1 task
Labels
area: @schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix

Comments

@Wartijn
Copy link

Wartijn commented Apr 25, 2025

Command

new

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

Description

When running npx @angular/cli@next new (currently @angular/[email protected] ) with the --minimal flag, the references array in tsconfig.json contains {"path": "./tsconfig.spec.json"}, which doesn't exist.

Minimal Reproduction

  1. Run npx @angular/cli@next new tmp-app --minimal
    • Which stylesheet format would you like to use? CSS
    • Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No
  2. open tsconfig.json

expected result

tsconfig doesn't contain any references to testing-related files, because of the new flag.

actual result

tsconfig.json contains:

  "references": [
    {
      "path": "./tsconfig.app.json"
    },
    {
      "path": "./tsconfig.spec.json"
    }
  ]

vscode complains: "File '/xxx/xxx/tmp-app/tsconfig.spec.json' not found"

Exception or Error


Your Environment

Angular CLI: 20.0.0-next.8
Node: 22.14.0
Package Manager: npm 11.3.0
OS: linux x64

Angular: 20.0.0-next.8
... build, cli, common, compiler, compiler-cli, core, forms
... platform-browser, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2000.0-next.8
@angular-devkit/core         20.0.0-next.8
@angular-devkit/schematics   20.0.0-next.8
@schematics/angular          20.0.0-next.8
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.0

Anything else relevant?

No response

@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity5: regression area: @schematics/angular labels Apr 25, 2025
@Wartijn
Copy link
Author

Wartijn commented Apr 25, 2025

I've also just noticed that tsconfig.app.json contains

  "exclude": [
    "src/**/*.spec.ts"
  ]

Which it doesn't need (and isn't added when running new with @angular/cli 19.2.9)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: @schematics/angular freq1: low Only reported by a handful of users who observe it rarely severity5: regression type: bug/fix
Projects
None yet
Development

No branches or pull requests

2 participants