#Importing javascript module from file outside of module root

1 messages · Page 1 of 1 (latest)

devout iron
#

Hi there, I'm trying to understand if it is possible to import and use a javascript module within my dagger module that exists on the local file system outside of the Dagger module root. e.g. given the following directory

.
└── my-javascript-module
    └── utility.ts
└── my-dagger-module
    ├── dagger.json
    └── index.ts

Would I be able to do import { myFunction } from "../my-javascript-module/utility" from within my-dagger-module/index.ts? My assumption is that this isn't possible and I will have to publish the utility to a package registry. The goal is that this utility could be consumed by multiple Dagger modules that are all defined in the same monorepo.