-
I found this answer from stackoverflow but it doesn't answer my question. I found a lot of code with tilde import in the Remix tutorial, i.e: Just wondering if anyone knows what does it mean? Which path does the tilde (~) resolves to in this case? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
the tilde is an alias for your |
Beta Was this translation helpful? Give feedback.
the tilde is an alias for your
./app
directory, in this case~/posts
maps to./posts.{ts,tsx,js,jsx,cts,mts}
or./posts/index.{ts,tsx,js,jsx,cts,mts}
in your app directory https://github.com/remix-run/remix/blob/main/packages/create-remix/templates/_shared_ts/tsconfig.json#L11-L13. We currently only support this path alias, but are looking into expanding it to any alias you configure in your jsconfig or tsconfig