Support for paths configured in tsconfig.json
See original GitHub issueHello 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:
- Created 6 years ago
- Reactions:38
- Comments:24 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
news?
@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 😃