I receive this error:
Cannot find module '@layouts/Page.astro' imported from '/PROJECT_FOLDER/src/pages/blog/index.mdx'
despite that file existing and I have this in my tsconfig.json
"paths": {
"@components/": ["./src/components/"],
"@layouts/": ["./src/layouts/"],
"@pages/": ["./src/pages/"]
}
Example page eg. index.mdx
title: 'TEST'
description: 'Lorem ipsum dolor sit amet'
pubDate: 'Jul 15 2023'
heroImage: '/blog-placeholder-2.jpg'
layout: '@layouts/Page.astro'
Lorem ipsum dolor sit amet.
I got the idea of using aliases from here: https://github.com/withastro/astro/issues/397#issuecomment-1193245056 and it would resolve my issue of having MDX files hierarchically, but it doesn't seem to work? I could do workaround with a few more paths but that would just seem dumb...
Any idea why this fails for me but works for someone else?