Skip to content

Commit

Permalink
Re-add options.location for serverless webpack compatibility, fixes #787
Browse files Browse the repository at this point in the history
  • Loading branch information
dnalborczyk committed Aug 19, 2019
1 parent 15f1520 commit e301a2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/LambdaFunction.js
Expand Up @@ -16,7 +16,12 @@ const { now } = Date

module.exports = class LambdaFunction {
constructor(functionName, functionObj, provider, config, options) {
const { servicePath, serverlessPath } = config
// TEMP options.location, for compatibility with serverless-webpack:
// https://github.com/dherault/serverless-offline/issues/787
// TODO FIXME look into better way to work with serverless-webpack
const servicePath = resolve(config.servicePath, options.location)
const { /* servicePath, */ serverlessPath } = config

const { name, handler } = functionObj
const [handlerPath, handlerName] = splitHandlerPathAndName(handler)

Expand Down

0 comments on commit e301a2d

Please sign in to comment.