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
Unable to resolve @theme in swizzled component file #816
Comments
Just add paths in your tsconfig.json {
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": ".",
"lib": [
"ES2021",
],
"jsx": "react",
"paths": {
"@theme/*": [
"src/theme/*"
],
}
}
}
|
This worked, but when i swizzle any component from APIExplorer it breaks the document and throws an error , |
I swizzled the ApiExplorer root directory and ApiItem directory, didn't see this error. If you are using yarn pnp as package manager, try to switch to |
Describe the bug
Swizzled components in typescript cannot resolve "theme" components
Expected behavior
Swizzled components should be able to resolve "theme" components
Steps to reproduce
1.Install docusaurus-openapi-plugin and theme version "3.0.0-beta.8"
2.Run yarn swizzle
3.Go to any file which imports file from "theme", it will be not be able to resolve
Screenshots
Your Environment
The text was updated successfully, but these errors were encountered: