I am creating a JS library and I am trying to do
//index.js in lib
export * from '@/foo/bar';
The code itself works, but I get the message when using the library somewhere else that also uses typescript like
import { baz } from 'myLib';
I receive a message saying "cannot resolve symbol" in Webstorm and "Module myLib has no exported member baz
Here is the tsconfig of my lib, that is built with webpack
{
"compilerOptions": {
"declaration": true,
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"skipLibCheck": true,
"suppressImplicitAnyIndexErrors": true,
"lib": ["esnext", "dom"],
"allowJs": true,
"outDir": "dist",
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
]
}
},
"include": ["src/**/*"]
}