Questions tagged [tsconfig-paths]
69 questions
0
votes
1 answer
tsconfig.json path pattern
Is there any way to include files by path pattern? For example, I am currently doing this in my scripts:
import '../../../../myresource/src/shared/my-interface'
However, I would like to simply use this:
import…

Radu
- 584
- 1
- 6
- 30
0
votes
1 answer
babel-plugin-module-resolver not working on .jsx files
I am working on a Typescript + SSR + ReactJs application. I am struggling to making this project works. The project actually works if I use relative paths, however I would like to use alias, and here is when the problems come. I also was able to…

Valentin Reviglio
- 33
- 3
- 5
0
votes
1 answer
tsconfig has set paths but doesn't compile alias
When I compiled the code using tsc, I found that my alias name had not been converted, but I had already configured Paths,Here is tsconfig.json
{
"compilerOptions": {
// https://github.com/TypeStrong/ts-loader/issues/1061
"target": "ES5",
…

chenmingzhen
- 63
- 1
- 6
0
votes
0 answers
Share typescript module between multiple projects
I am using the TS paths approach to include the shared folder in my API project.
Here's a piece of my API's tsconfig.json file:
The challenge here is that the shared folder has its own dependencies and package.json
The overall project structure…

inside
- 3,047
- 10
- 49
- 75
0
votes
1 answer
Setting tsconfig.json target breaks paths
Here's my import
import { test } from "test";
These settings will import correctly, but are missing modern TS features
//tsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"test": ["../test"]
}
…

Seph Reed
- 8,797
- 11
- 60
- 125
0
votes
1 answer
How can I get a Typescript script to use the paths defined in tsconfig?
In my NodeJS/Typescript project, I created a script database-init.script.ts that I run to initialize the database with sample data.
My package.json looks like this:
{
"name": "myproject",
....
"scripts": {
...
"mongodb-setup":…

CodyBugstein
- 21,984
- 61
- 207
- 363
0
votes
1 answer
Understanding "baseUrl" and "paths" in TypeScript with * glob
I have a monorepo created with yarn workspaces and the following folder structure:
├── foo (workspace @project/foo)
│ ├── package.json
│ └── src
│ └── index.ts
├── bar (workspace @project/bar)
│ ├──…

Paul Razvan Berg
- 16,949
- 9
- 76
- 114
0
votes
0 answers
Can you get webpack to resolve tsconfig paths without bundling a specific path module?
I have a tsconfig.json file that contains paths to be used in my typescript and tsconfig-paths-webpack-plugin for webpack's use. However, one of the paths references a shared library located outside of the project directory. When I attempt to…

Jake
- 1
- 1
0
votes
1 answer
Using tsconfig-paths with a project?
I'd like to setup tsconfig-paths for this project.
I'm not sure what I need to do after installing tsconfig-paths as a dev dependency.
Thoughts?

Ole
- 41,793
- 59
- 191
- 359