Closed Pratosh22 closed 6 days ago
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 ,
It was mentioned in #633 as well.
This worked, but when i swizzle any component from APIExplorer it breaks the document and throws an error , It was mentioned in #633 as well.
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 nodeLinker: node-modules
.
Just tried the above, The error does not occur when i swizzle ApiExplorer and ApiItem Directory but it comes when i swizzle few files from ApiExplorer and do not swizzle the rest of files. Is this the expected behaviour or am i missing something?
The below are the files i swizzled
Just tried the above, The error does not occur when i swizzle ApiExplorer and ApiItem Directory but it comes when i swizzle few files from ApiExplorer and do not swizzle the rest of files. Is this the expected behaviour or am i missing something? The below are the files i swizzled
Yes, you need many other files because ParamFormItems uses a FormItem component, and a react-hook-form context provided in Response component. Basicly you need to swizzle all related files to make it work.
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