serverless-offline icon indicating copy to clipboard operation
serverless-offline copied to clipboard

Expose option for disabling use of package artifact in serverless yaml

Open Leglaw opened this issue 5 years ago • 1 comments

Feature Request

For teams not yet ready to use the package artifact as part of their development routine, would like to have a way to disable using the package artifact defined in the serverless.yml by using an custom option available to the serverless-offline plugin.

Sample Code

  • file: serverless.yml
service: my-service

plugins:
  - serverless-offline

custom:
  serverless-offline:
    ignorePackageArtifact: true

provider:
  runtime: nodejs12.x
  stage: dev

functions:
  hello:
    events:
      - http:
          method: get
          path: hello
    handler: handler.hello
  • file: handler.js
'use strict'

const { stringify } = JSON

exports.hello = async function hello() {
  return {
    body: stringify({ foo: 'bar' }),
    statusCode: 200,
  }
}

Expected behavior/code

It should not attempt to use or extract the package artifact defined in the serverless yaml and instead run the code in src.

Leglaw avatar Apr 06 '21 18:04 Leglaw

#1208

Leglaw avatar Apr 06 '21 18:04 Leglaw