I just created a Typescript Docusaurus website.
I know docusaurus has webpack aliases for React components imports (@site, etc), but IntelliJ cannot recognise these imports: i.e. Ctrl+B on the type won't go to source, and a red squiggle marks an error.
Is there a way to make IntelliJ ignore these prefixes and make it understand where the component is? AFAIU it's supposed to ignore the @site string all together, and all imports should work.
I did follow the official instructions and after creating the site, I added the tsconfig.json and the exta types package as recommended, but to no avail:
$ cat tsconfig.json
{
"extends": "@tsconfig/docusaurus/tsconfig.json"
}
$ grep tsco package.json
"@tsconfig/docusaurus": "^1.0.5",
$
EDIT
I recreated the project from scratch:
$ npx create-docusaurus@latest mytest --typescript
$ yarn add --dev typescript @docusaurus/module-type-aliases @tsconfig/docusaurus
$ cat tsconfig.json
{
"extends": "@tsconfig/docusaurus/tsconfig.json"
}
yarn run build works OK, everything OK, just IntelliJ is marking @site imports as errors the SAME way.
This is the relevant config:
I've tried the bundled Typescript binary as well, but same result.
EDIT 2:
VSCode has the same identical issue: it's a problem within the repository, not with IntelliJ.
At this point, I completely ran out of ideas, any pointers anyone? :(




