diff --git a/src/serverless/get-handler.js b/src/serverless/get-handler.js index bf74f4d..de6f8c1 100644 --- a/src/serverless/get-handler.js +++ b/src/serverless/get-handler.js @@ -1,7 +1,9 @@ // @flow const { readFileSync } = require('fs') -const { join } = require('path') -const handler = readFileSync(join(__dirname, 'handler.js')).toString() + +// This needs to be relative because it otherwise +// doesn't work when `webpack`-ed +const handler = readFileSync('handler.js').toString() // symbols to replace in the meta-source const CMD_SYMBOL = '/*NOW_CMD*/'