Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Esbuild watch with sls offline not working #108

Closed
ipauler opened this issue Apr 7, 2021 · 8 comments
Closed

Esbuild watch with sls offline not working #108

ipauler opened this issue Apr 7, 2021 · 8 comments

Comments

@ipauler
Copy link

ipauler commented Apr 7, 2021

Hello.
I've added a watch pattern in esbuild config

watch:
      pattern: [ 'src/**/*.ts']

it's recompiling code after changes, but those changes are not working
like if i add console.log('hello') it will recompile but i won't see that console.log() anywhere
same for other changes

@joelpickup
Copy link

Are you certain it's not this long standing issue with serverless-offline (dherault/serverless-offline#864) ?

Enabling --useChildProcesses fixes this.

@ipauler
Copy link
Author

ipauler commented Apr 7, 2021

@joelpickup thank you will check
looks like it

@ipauler
Copy link
Author

ipauler commented Apr 7, 2021

using childProcess flag helps, but after rebuild i have cold start which is not useful in my case
anyway thanks, i'll be waiting for some fixes on serverless-offline side

@olup
Copy link
Contributor

olup commented Apr 11, 2021

I'll close this. Feel free to reopen if you need more help or find bugs on this lib's side.

@olup olup closed this as completed Apr 11, 2021
@henrypenny
Copy link

--useChildProcesses

Detected unrecognized CLI options: "--useChildProcesses".

@abhijeet-toptal
Copy link

try --reloadHandler with serverless offline

@deviant32
Copy link

still not working for me with reloadHandler

@naydichev
Copy link

naydichev commented Feb 9, 2023

also not working for me!

edit: nevermind, fixed it!

In serverless.yml add:

custom:
  offline:
    useChildProcesses: true

and then I called called sls offline --reloadHandler, and it works for me now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants