You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue where I can't import my module with typescript aliases in a Next.js typescript project.
// contentlayer.config.tsimporttype*asHfrom'hast';import{makeSource,defineDocumentType,ComputedFields,}from'contentlayer/source-files';importreadingTimefrom'reading-time';importrehypeAutoHeadingsfrom'rehype-autolink-headings';importrehypeSlugfrom'rehype-slug';importremarkGfmfrom'remark-gfm';importrehypeShikifrom'@re-taro/rehype-shiki';import{getHighlighter}from'shiki';import{getImgProps}from'@site/helpers';// Here's the module
// tsconfig.json{"compilerOptions": {// ...other of the config"paths": {"@site/*": ["./src/*"],"@content": ["./.contentlayer/generated"]}},"include": ["next-env.d.ts","**/*.ts","**/*.tsx",".contentlayer/generated"],"exclude": ["node_modules"]}
I have an issue where I can't import my module with typescript aliases in a Next.js typescript project.
contentlayer
version:"^0.2.5"
next-contentlayer
version:"^0.2.5"
When running
Here's what I got
Is that possible to use path aliases with typescript to solve this?
Thanks in advance!
The text was updated successfully, but these errors were encountered: