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.

Support for paths configured in tsconfig.json

See original GitHub issue

Hello Stackblitz,

First of all, congratulations for the spectacular platform.

As a good practice to skip from ‘…/…/…’ hell, I make use of tsconfig.json compilerOptions/paths feature like above:

{
  "compilerOptions": {
    .....
    "baseUrl": "src",
    "paths": {
      "@app/*": ["app/*"],
      "@env/*": ["environments/*"]
    }
  }
}

In this way, I can import my home component from core module like: import {HomeComponent} from '@app/core/pages/home/home.component';

Do you have plans to support this feature?

Sample Project: angular-xzddx4

Edit line 8 and 9 of /app/app.module.ts

Best Regards, Bernardo Baumblatt.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:38
  • Comments:24 (2 by maintainers)

github_iconTop GitHub Comments

23reactions
julianobrasilcommented, Mar 19, 2019

news?

9reactions
EricSimonscommented, Dec 21, 2017

@baumblatt thanks for the kind words! And yes for sure, we’re working to open up tsconfig for folks to modify — will make custom paths makes it in 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

paths - TSConfig Option - TypeScript
TypeScript in 5 minutes. An overview of building a TypeScript web app. TSConfig Options. All the configuration options for a project.
Read more >
How to use paths in tsconfig.json? - Stack Overflow
In your tsconfig, place this param and path to the base file ``` { ... "extends": "./tsconfig.base.json", ... } ``` Then in the...
Read more >
tsconfig-paths - npm
Use this to load modules whose location is specified in the paths section of tsconfig.json or jsconfig.json . Both loading at run-time and...
Read more >
Support tsconfig-paths and specify tsconfig*.json #28 - GitHub
Primary use case is to allow the typescript compiler to use different paths when compiling the serverless.ts definition file. Monorepos such as ...
Read more >
Use `@scope` Paths for Shorter Import Paths Configurable in ...
Use `@scope` Paths for Shorter Import Paths Configurable in tsconfig.json.
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