if my Lambda’s handler is in an `index.mjs` file, ...
# help
s
if my Lambda’s handler is in an
index.mjs
file, is there a way to make an SST function definition accept the
mjs
extension in the
handler
property?
seems it’s not doable. I’m gonna have to somehow make Nuxt 3 not use
.mjs
as its file extensions
t
Yeah this is something that needs to be fixed. I actually want to make this the default way we think about esm vs non esm instead of package.json type field
s
I just symlinked a js file to the mjs one for now
I'm not sure if git will preserve that
t
ah smart, it should
the reason I didn't do this initially is aws's runtime doesn't recognize .mjs - weird because their production version does but I think we're gonna move off their version of things
s
what do you mean by move off their version?
t
we use that aws-runtime-ric thing to spawn your lambda. Initially I was trying to mirror the same behavior as it has on prod but now that I'm familiar with it I realize it does almost nothing
And we had to fork it to fix a bunch of issues anyway
s
ahh, gotcha
t
If we just reimplemented it we can fix a bunch of things + make things faster