{"action":"created","issue":{"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/349","repository_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack","labels_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/349/labels{/name}","comments_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/349/comments","events_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/349/events","html_url":"https://github.com/serverless-heaven/serverless-webpack/issues/349","id":305525620,"number":349,"title":"invoke local --watch is not working","user":{"login":"crysislinux","id":5404597,"avatar_url":"https://avatars2.githubusercontent.com/u/5404597?v=4","gravatar_id":"","url":"https://api.github.com/users/crysislinux","html_url":"https://github.com/crysislinux","followers_url":"https://api.github.com/users/crysislinux/followers","following_url":"https://api.github.com/users/crysislinux/following{/other_user}","gists_url":"https://api.github.com/users/crysislinux/gists{/gist_id}","starred_url":"https://api.github.com/users/crysislinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crysislinux/subscriptions","organizations_url":"https://api.github.com/users/crysislinux/orgs","repos_url":"https://api.github.com/users/crysislinux/repos","events_url":"https://api.github.com/users/crysislinux/events{/privacy}","received_events_url":"https://api.github.com/users/crysislinux/received_events","type":"User","site_admin":false},"labels":[{"id":425929482,"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-03-15T12:08:33Z","updated_at":"2018-03-17T09:48:06Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n1. Please check if an issue already exists so there are no duplicates\r\n2. Fill out the whole template so we have a good overview on the issue\r\n3. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the Issue\r\n4. Please follow the template, otherwise we'll have to ask you to update it\r\n-->\r\n\r\n# This is a Bug Report\r\n\r\n## Description\r\n\r\n* What went wrong?\r\nstart with\r\n`sls invoke local --function some-function --watch`\r\nwhen change the code, it recompiles the code,  but it still seems invoke the old compiled result\r\n\r\n* What did you expect should have happened?\r\nIt should run the latest compiled result just as what the documentation says.\r\n\r\n* What was the config you used?\r\n\r\n```\r\nservice: some-service\r\n\r\nplugins:\r\n  - serverless-webpack\r\n  - serverless-offline\r\n\r\ncustom:\r\n  webpack:\r\n    webpackIncludeModules: true\r\n\r\npackage:\r\n  individually: true\r\n\r\nprovider:\r\n  name: aws\r\n  runtime: nodejs6.10\r\n  stage: dev\r\n  region: us-east-2\r\n\r\nfunctions:\r\n  some-function:\r\n    handler: some-function/handler.handler\r\n```\r\n\r\n* What stacktrace or error message from your provider did you see?\r\nNo errors, the output is like this\r\n![image](https://user-images.githubusercontent.com/5404597/37462082-a9ba286c-288b-11e8-92e0-cc1a4b597afb.png)\r\n\r\nthe second time it should output 5 instead of 6 because the code has changed.\r\n\r\nSimilar or dependent issue(s):\r\n\r\n\r\n## Additional Data\r\n\r\n* ***Serverless-Webpack Version you're using***:  5.1.0\r\n* ***Webpack version you're using***: 4.1.1\r\n* ***Serverless Framework Version you're using***: 1.26.1\r\n* ***Operating System***: macOs High Sierra  10.13.3\r\n* ***Stack Trace (if available)***:\r\n"},"comment":{"url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/comments/373907819","html_url":"https://github.com/serverless-heaven/serverless-webpack/issues/349#issuecomment-373907819","issue_url":"https://api.github.com/repos/serverless-heaven/serverless-webpack/issues/349","id":373907819,"user":{"login":"HyperBrain","id":5524702,"avatar_url":"https://avatars3.githubusercontent.com/u/5524702?v=4","gravatar_id":"","url":"https://api.github.com/users/HyperBrain","html_url":"https://github.com/HyperBrain","followers_url":"https://api.github.com/users/HyperBrain/followers","following_url":"https://api.github.com/users/HyperBrain/following{/other_user}","gists_url":"https://api.github.com/users/HyperBrain/gists{/gist_id}","starred_url":"https://api.github.com/users/HyperBrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyperBrain/subscriptions","organizations_url":"https://api.github.com/users/HyperBrain/orgs","repos_url":"https://api.github.com/users/HyperBrain/repos","events_url":"https://api.github.com/users/HyperBrain/events{/privacy}","received_events_url":"https://api.github.com/users/HyperBrain/received_events","type":"User","site_admin":false},"created_at":"2018-03-17T09:48:06Z","updated_at":"2018-03-17T09:48:06Z","author_association":"OWNER","body":"The code of the second answer here would make it possible to remove the old cached module and let the next invocation start freshly.\r\n\r\nhttps://stackoverflow.com/questions/9210542/node-js-require-cache-possible-to-invalidate\r\n"}}
{"actor":{"display_login":"HyperBrain"}}