DEV Community

loading...

Discussion on: Monorepos: Lerna, TypeScript, CRA and Storybook combined

Collapse
dontepsu profile image
Patrik Keinonen

Hi @shnyder

I'd like to leverage intellisense with TypeScript and VS Code. With the current, it's building, but VS Code does not find the reference to the shared components.

Collapse
shnydercom profile image
shnyder Author

did you build your most recent code as a library? When you run "yarn start" in the CRA-project it will look into your node_modules folder for a library build. There should be a symlink to your ui-lib-project folder, but the package.json of the UI-lib only tells the "outside world" where to find the main javascript and typescript-files that you've built, not the content of its /src-folder:
"main": "./lib/index.js",
"module": "./lib-esm/index.js",
"types": "./lib/index.d.ts",