Skip to content
New issue

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

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

Already on GitHub? # to your account

Use --webpack-use-polling to switch to fs polling mode on watch #225

Merged
merged 2 commits into from
Sep 18, 2017

Conversation

HyperBrain
Copy link
Member

@HyperBrain HyperBrain commented Sep 17, 2017

What did you implement:

Closes #215

How did you implement it:

The watch command now evaluates the --webpack-use-polling option with and without parameter
and turns on poll mode in Webpack's watch API.
Added documentation in the README to invoke local --watch and serverless-offline.

How can we verify it:

Use the switch (serverless invoke local --watch --webpack-use-polling) on a file system that does
not support events (Docker mounted volume).

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

@HyperBrain
Copy link
Member Author

@barfet, can you check this PR and see if it solves the problem within Docker if you add the --webpack-use-polling switch?

@HyperBrain HyperBrain changed the title Use --webpack-use-polling to switch to fs pooling mode on watch Use --webpack-use-polling to switch to fs polling mode on watch Sep 17, 2017
@barfet
Copy link

barfet commented Sep 17, 2017

@HyperBrain Sure, I'll check it tomorrow and will let you know. Thanks again for your efforts!

@barfet
Copy link

barfet commented Sep 18, 2017

@HyperBrain Today I was able to test it in Docker with node --debug=0.0.0.0:5858 --nolazy node_modules/.bin/serverless offline --webpack-use-polling and it's working perfectly (debugging in VS code + recompilation on files changing in the host machine) thank you ones again!
When are you planning to release this feature? I'm very exited to use it in my project.

P.S.
Only one thing that I noticed is service folder was created in my out .build directory and compiled files was placed in it. Don't know if it's related to your commit, but my configuration wasn't changed from the last time and I have any configs to create this folder.

@HyperBrain
Copy link
Member Author

@barfet Great to hear that it works 🎉 ! I will release it most likely end of this week (but merge it earlier to master).

The service folder is new with version 3.0.0 where the compiled service artifacts will be placed if you don't use individual packaging. I released the official 3.0.0 some days ago, so it might be that you previously used a 2.x version. So that's nothing to worry about 😄

@HyperBrain HyperBrain merged commit fe45384 into master Sep 18, 2017
@HyperBrain HyperBrain deleted the watch-polling branch September 18, 2017 14:18
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants