Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Alias resolution requires duplicate #44

Open
eakl opened this issue Jan 10, 2022 · 0 comments
Open

Alias resolution requires duplicate #44

eakl opened this issue Jan 10, 2022 · 0 comments

Comments

@eakl
Copy link

eakl commented Jan 10, 2022

Hi

I wonder if this is a bug from craco-alias or typescript.

I would like to type @layout to resolve to ./layout. then adding a forward / would continue the path.
e.g.
@layout --> ./layout/index.ts
@layout/main --> ./layout/main.ts

So in tsconfig.json I did

"paths": {
    "@layout": ["./layout"],
}

But it doesn't work in both case. For the above use case to work, I should add kind of a duplicate

"paths": {
    "@layout": ["./layout"],
    "@layout/*": ["./layout/*"],
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant