-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work for path mapping starting with /
#128
Comments
@ashubham I appreciate your work in finding this! I'm trying to find a path-mapping solution that works with both parcel and tsconfig-paths, and parcel only likes path replacements when they start with |
@ashubham can you give me an example of some of the |
I am trying to use https://github.com/vitejs/vite to build/bundle our application. Which needs custom path mappings to start with a So my imports look like: import { getUtilFn } from '/@utils/layout';
import { useQuery } from '/@services/query'; |
@ashubham Just curious, and it's a matter of taste probably, but why do you start with As a workaround, until |
Now that typescript also allow the paths to start with a |
Removing that line did the trick. My tsconfig.json
import phrase
Can we fix it? |
Hello, is there any update on this? Our use case: Thanks for the great work! |
I'm pretty sure a module import starting with an '/' failing to resolve is caused by this line: https://github.com/dividab/tsconfig-paths/blob/master/src/try-path.ts#L27 |
I have tsconfig paths configured as:
These fail to resolve to the correct paths due to this line in code:
https://github.com/dividab/tsconfig-paths/blob/master/src/try-path.ts#L27
Do we need this check ?
The text was updated successfully, but these errors were encountered: