any reason the esbuild `onEnd` callback doesn’t wo...
# help
any reason the esbuild
callback doesn’t work/exist in SST’s environment?
{ onResolve: [Function: onResolve], onLoad: [Function: onLoad] }
ahh, old version of esbuild. can we get that upgraded to the latest? without it, it’ll be impossible for me to spit out source + source maps in the correct folder structure I need to upload to Sentry
I tried using
in package.json to force it to 0.12.x. well.. that didn’t work out so well when I tried to build the SST app w/ my esbuild plugin (which works fine in a Serverless Framework project).
Copy code
> /Volumes/SuperData/Sites/reelcrafter/v2-microservices/node_modules/esbuild/lib/main.js:233:10: error: "metafile" must be a boolean
    233 │     throw new Error(`"${key}" must be ${mustBe}`);
        ╵           ^
    at getFlag (/Volumes/SuperData/Sites/reelcrafter/v2-microservices/node_modules/esbuild/lib/main.js:233:11)
    at flagsForBuildOptions (/Volumes/SuperData/Sites/reelcrafter/v2-microservices/node_modules/esbuild/lib/main.js:345:18)
    at buildOrServeContinue (/Volumes/SuperData/Sites/reelcrafter/v2-microservices/node_modules/esbuild/lib/main.js:1097:9)
    at /Volumes/SuperData/Sites/reelcrafter/v2-microservices/node_modules/esbuild/lib/main.js:1029:13
without being able to hook into
, I can’t think of any good way to get
files in the right structure. except writing a script that builds a directory tree of my project, and then goes into
and whenever it sees a
file, it copies it into a temp folder using the same path of my project.. but this sounds like a mess 😄
I'll take a look into this tomorrow since it's blocking you
Thank you, much appreciated!
And as a bonus I can copy your setup and get sentry source maps fixed in my project
I feel like source map support or flexibility is often neglected in frameworks, and it requires significant extra work to get them set up
Hey @thdxr not sure it helps, we have an open PR updating esbuild to 0.12.17 -
@Frank that would be a HUGE help, seeing as I already have an esbuild plugin written to generate source maps for Sentry. @thdxr feel free to PM me if you want to bounce around ideas on source map support in SST, or test out prototypes, etc
I think a config property in
or something would be amazing. zero-config source maps.. just dumps everything you need, wherever you want it. very few frameworks make it that easy 😄
Will be working on this after lunch - can follow along here:
Made another issue for source map specific stuff - we should discuss exactly what it should do
saw the merged PR for the esbuild update - thanks! is that out now in 0.39.0?
ah nvm, last publish was 17 hrs ago
It's out now 🙂
sweeeeet! 🎉
a thousand thanks 🙂
Wait to thank me until it fixes your problem 😂
haha. I’ll let you know. and happy to share the esbuild plugin too if it helps you until SST has more robust source map options