serverless / serverless-plugin-typescript

Serverless plugin for zero-config Typescript support
MIT License
783 stars 223 forks source link

Overriding the servicePath breaks other plugins #253

Open SanderKnape opened 2 years ago

SanderKnape commented 2 years ago

Hello. This package overrides the servicePath, causing issues for other plugins that are now trying to find files (such as the schema.graphql) in the .build folder instead of the root.

I ran into this issue with the serverless-appsync-simulator, and I see it also causes issues when using Lambda layers.

Is there any chance this functionality can be changed to improve compatibility with other plugins?

avafloww commented 2 years ago

This also breaks serverless-azure-functions.

alexandrubese commented 2 years ago

Is there any timeframe for fixing this? Its an open dependency for working with lambda layers which is a common used pattern : https://github.com/serverless/serverless-plugin-typescript/issues/240

Without this fix this plugin is rendered useless in working with layers without including other plugins such as serverless-jetpack

liam-ot commented 1 year ago

hello, i have a possible solution for this can someone give me the rights to open a PR please?

also, a workaround here is to include your graphql schema location in the pacakge.patterns array like so:

app: foobar
…
package:
  excludeDevDependencies: true
  patterns:
    - '!node_modules/aws-sdk'
    - '!node_modules/**/aws-sdk/**'
    - '!.vscode/**'
    - '!.dynamodb/**'
    - 'schema.graphql'
…
liam-ot commented 1 year ago

@medikoo tagging you to point you to my comment above :)