Hi :wave: , with live debugging on, looks like add...
# help
l
Hi 👋 , with live debugging on, looks like adding new files requires rebuilding the app, otherwise, they won’t be picked up? 🤔
t
Yeah I believe that is a bug with how we do file watching at the moment
l
I guess sst under the hood uses esbuild? From their doc, doesn’t specifically mention whether new files will be watched https://esbuild.github.io/api/#watch
t
I think our issue is we're currently building it once on start, looking at the metafile to see which files makeup the bundle, and then we watch those files. If you add a file in a certain way it won't get picked up
We're considering simplifying it to just watch the folder but there's other tradeoffs there to think through
l
cool, thanks for explaining! are there any workaround in the mean time?
t
What I do is just stop and restart sst start
it's not always an issue with any new file - I'm forgetting the exact situation
l
cool, no worries
f
Hey @Longyang Zhang, the scenario @thdxr mentioned is described here https://github.com/serverless-stack/serverless-stack/issues/33
If you make an edit and save the file that’s importing the new file, it will trigger esbuild to build again.
l
Thanks @Frank ! Will have a look