I made my own style guide using react-styleguidist and typescript. Now after building the node package (private) and importing (npm install) it into my other project (where I want to use my style guide components) I am not able to get intellij suggestions to work.
My folder structure is (some files are omitted):
My-library/
package.json
README.md
lib/
components/
Alert/
Alert.d.ts
Alert.d.ts
index.d.ts
index.js
Other_Components/
css/
fonts/
icons/
index.d.ts
index.js
styled-components.d.ts
styled-components.js
I did already check if my node_modules folder of my project was marked as library root (which it is) and I also checked if my package was showing up as not excluded.
My own style guide library works fine, I can use my components and type checking works as well.
I have been looking online for a good guide of how to build/package your project so that these IDE(suggestions/autocomplete) functions work correctly.
When I used the ant design(https://ant.design/) library in intellij and typed <Bu
intellij would suggest me <Button>
Same goes for when using Material-ui and the extra @types/material-ui npm package
This is what I would like to achieve with my own npm package as well.
I have no clue if the problem is in my import/exports (default)/index files or in one of my config files (package.json, .babelrc or tsconfig.json, webpack.config.js)