https://pulumi.com logo
Title
r

refined-terabyte-65361

06/07/2022, 10:50 PM
Hello i have pulumi.ComponentResource called(Application) defined in a git repo A i want to import that ComponentResource into git repo B something like import { Application} from "git repo ";
b

billowy-army-68599

06/07/2022, 11:01 PM
You'll need to reference it in your package manager as well
r

refined-terabyte-65361

06/07/2022, 11:03 PM
i am currently using git submodule and using import { Application} from "./assets/foo";
was checking if there is a simpler way instead of maintaining the submodule version
b

billowy-army-68599

06/07/2022, 11:12 PM
Are you using typescript?
r

refined-terabyte-65361

06/07/2022, 11:13 PM
yes
l

little-cartoon-10569

06/08/2022, 12:30 AM
You can publish the package to your local package registry (or to GitHub's / GitLab's / ...), and the resolve it in the normal way using npm or yarn. But if both repos are under regular development, you might be better off leaving it as-is for now. Switch to publishing packages later, when you're making fewer changes.
👍 1
You can also use yarn workspaces, typescript paths, and a number of other non-Pulumi-specific solutions.
👍 1