```path.join(__dirname, './custom-resource')``` th...
# help
d
Copy code
path.join(__dirname, './custom-resource')
this is equaling
/.build/lib/custom-resource
which is unexpected. I would have thought it would have been
/lib/constucts/ApiSite/custom-resource
I think its because the TS outputs are going into .build but not the adjacent
custom-resource
folder wiht my lambda asset in it. Although I see this being done quite frequently in the sst code. How should we develop Constructs that we’d like to eventually publish to npm that require function assets like this?
t
Can you try require.resolve("packagename")
And then path.resolve to navigate relatively from there
If you search in the SST codebase I think I do that
d
Oh ya? I’ll search for it…. just kept seeing this in there. So I was curious why that works for you guys but not for my construct.
t
I'll find an example when I'm at my computer