I have some confusion here. I have a project which just returns some types and a react component, it is published to npm. I have set my tsconfig file as so:
{
"compilerOptions": {
"target": "ES6",
"lib": ["dom", "es6"],
"jsx": "react-jsx",
"module": "ES6",
"rootDir": ".",
"declaration": true,
"outDir": "./build",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "Node",
"strict": true,
"skipLibCheck": true
},
"include": ["./index.d.ts", "src/**/*"],
"exclude": ["src/**/*.types.ts"]
}
I have set the following values in my package.json:
"main": "build/index.js",
"types": "build/index.d.ts",
"files": [
"build",
"LICENSE"
],
...
"scripts": {
...
"build": "rm -rf build && tsc && cp index.d.ts ./build",
},
When I install the package in my consuming project, it all appears to work but I have no intellisense. Can anyone advise? The complete library is here https://www.npmjs.com/package/next-picture-image and it is a public repo.