I have Pacakage 'A' And app 'B'
'Package A'
index.ts
export default "foo"
A's package.json
main: index.ts
types: index.ts
A's tsconfig.json
"module": "commonjs",
'APP B'
import value from "A"
B's pacakge.json
"type": "commonjs",
B's tsconfig
"module": "CommonJS",
My problem is that after typescript compile App B.
It generate plain commonjs which dosen't know how to use export keyword inside of node_modules A.
OK, I understand that.
If so, should I set the main of A's package.json as index.js?
If so, do I have to build every time A changes so that make sure index.js is updated?
That seems too handy....
Is it possible to make package A build together when App B is compiled?
Or any advice please...