From ee6c78edd0b76f08a13c0956dd7ebbbf0435ca98 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Sat, 19 Aug 2017 01:19:57 +0200 Subject: [PATCH] Made google cloud deployments work again --- src/serverless/get-handler.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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*/'