Skip to content

Commit 3e552d0

Browse files
committed
hot reload
1 parent eb12f34 commit 3e552d0

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Ryze0323 Fork Version
2+
3+
In the case of version 12.0.4, a speed issue occurred because all packages had to be read and processed each time when developing in a node environment. All folders except the node_modules folder have been changed to reflect user changes.
14
# Serverless Offline
25

36
<p>

src/lambda/handler-runner/in-process-runner/aws-lambda-ric/UserFunction.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ const { pathToFileURL } = require('node:url')
334334
throw new MalformedStreamingHandler('Only response streaming is supported.')
335335
}
336336
module.exports.load = async function (appRoot, fullHandlerString) {
337+
Object.keys(require.cache)
338+
.filter((cache) => !cache.includes('node_modules'))
339+
.forEach((item) => {
340+
delete require.cache[item]
341+
})
337342
_throwIfInvalidHandler(fullHandlerString)
338343
const [moduleRoot, moduleAndHandler] =
339344
_moduleRootAndHandler(fullHandlerString)

0 commit comments

Comments
 (0)