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.

[Request] Opt out of tsconfig automation

See original GitHub issue

screen shot 2018-10-30 at 8 32 40 am

Above is the result of running yarn start

react-scripts v2.1.0

I use the following code so I can use absolute paths in my TypeScript files, but everytime I run the yarn command, everything gets blown out, and I can’t run my project

    "baseUrl": "./",
    "paths": {
      "src/*": [
        "src/*"
      ]
    }

Is there a way or could there be a way to opt out of react-scripts auto-generating the tsconfig?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
martinmckennacommented, Oct 30, 2018

That’s…disappointing. I’ve used absolute paths very successfully in large scale TypeScript projects - not sure why such a rule would be enforced so heavy-handedly here.

5reactions
Timercommented, Oct 30, 2018

These values are not supported and are no-op in Create React App. They are removed to prevent confusion and fix errors (so they show properly) in VSCode.

Aliasing paths is a foot gun and isn’t of much value when using VSCode or an IDE. Absolute imports (baseUrl) will be supported at a later date. Closing as a duplicate of #5118. You can see a more detailed explanation here: https://github.com/facebook/create-react-app/issues/5585#issuecomment-433900655

Read more comments on GitHub >

github_iconTop Results From Across the Web

TSConfig Reference - Docs on every TSConfig option
paths lets you declare how TypeScript should resolve an import in your require / import s. {. " compilerOptions ": {. " baseUrl ......
Read more >
strip - How can I initiate a TypeScript tsconfig.json file without ...
1 Answer 1 · -i will modify the tsconfig.json in-place · /^[ \t]*\//d removes the single line comments (by removing lines which start...
Read more >
ts-jest - npm
ts-jest is a TypeScript preprocessor with source map support for Jest that lets you use Jest to test projects written in TypeScript.
Read more >
Compiling TypeScript into JavaScript - PyCharm - JetBrains
To compile the TypeScript code of the entire application, select Compile All. · To compile one file, open it in the editor, and...
Read more >
Upcoming improvements to Angular library distribution
This change will not require any action by developers. Libraries dependent on View Engine ... bar graph of applications opting out of Ivy....
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