question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

solutions style tsconfig disappeared after update to angular 10.1

See original GitHub issue

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

I’m using solutions style tsconfig to add types for scripts.

// tsconfig.json

{
  "files": [],
  "references": [
    {
      "path": "./projects/my-app/tsconfig.app.json"
    },
    {
      "path": "./projects/my-app/tsconfig.spec.json"
    },
    {
      "path": "./tsconfig.scripts.json"
    }
  ]
}

// tsconfig.scripts.json

{
  "compilerOptions": {
    "strict": true,
    "target": "ESNext",
    "module": "CommonJS",
    "esModuleInterop": true,
    "types": ["node"],
    "allowJs": true
  },
  "include": ["./extra-webpack.config.ts","./build-script.ts"]
}

Update to ng 10.1 remove my solutions style tsconfig. So β€œ./tsconfig.scripts.json” will not work after update to 10.1.0-next.7

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alan-agius4commented, Aug 28, 2020

Can we keep solution style tsconfig manually?

Will it still be removed in the future? No, but using solutions style tsconfig at this point might result in broken journeys such as when new generate a new application, library etc, therefore I wouldn’t recommend keeping solutions style tsconfig.

(Another infomation: we start use solution style tsconfig in angular 8, but it was removed in ng 10.1) Can we only remove solution style tsconfig if it was updated from angular 10.0? Solutions tsconfig was introduced in version 10 and will be removed in version 10.1.

In future we might reconsider adding and supporting solutions style tsconfig but we need some changes on the TypeScript side. We, together with the TypeScript at Microsoft decided that for the best DX, it’s best to rollback solutions style tsconfig and offer the same IDE experience that we did pre version 10.

In many cases, there are other approaches to solutions style tsconfig’s. Such as create a sub-directory with a tsconfig.json inside it, which at this point in time would be my recommended approach.

1reaction
alan-agius4commented, Aug 27, 2020

We understand that there might be a subset of users IDE experience might be effected by reverting the solutions style tsconfig.

At this stage, the recommended approach if you want to use different compiler options would be to place these files in a separate directory, rename tsconfig.scripts.json to tsconfig.json and move it inside the new directory.

This is also something which the TypeScript team suggested to address some issues being experienced with solutions style tsconfig see: https://github.com/microsoft/TypeScript/issues/39632#issuecomment-663220708

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 9 to 10 solution style tsconfig.json should be created ...
The migration to create tsconfig.base.json was removed because it caused unexcepted bugs. You can read about it here:Β ...
Read more >
"Solution Style" tsconfig.json not loaded correctly
Testing by renaming the tsconfig.app.json to tsconfig.json shows everything working, so it seems to be the 'references' aren't loaded in. Seeing as Angular10Β ......
Read more >
Update Angular to v15
This topic provides information about updating your Angular applications to Angular version 15. For a summary of this information and the step-by-stepΒ ...
Read more >
Guide to update your Angular application v5.2 -> v11.0 for ...
Update all of your Angular framework packages to v6, and the correct version of RxJS and TypeScript. NG_DISABLE_VERSION_CHECK=1 npx @angular/cli@6 update @Β ...
Read more >
5.2 - Angular Update Guide
If you have TypeScript configured to be strict (if you have set strict to true in your tsconfig.json file), update your tsconfig.json to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found