Reputation: 2542
I have two modules. One is a dependency of the other.
One module, base-module
is structured like -
/
/src
/Widget
index.tsx
package.json
and I want to import Widget
into the other module.
I have added base-module
as a dependency in its package.json
.
It works if I write
import Widget from "base-module/src/Widget"
How do I get it to be
import Widget from "base-module/Widget"
?
I am using webpack and typescript.
Upvotes: 0
Views: 357
Reputation: 136
Define index.tsx
in base-module/
and import, export Widget
there.
Upvotes: 1