I’ve been trying to update a repository I’ve inherited from Serverless Framework v3 to v4.
However when I do this I get deploy-time errors originating from esbuild:
✘ [ERROR] No loader is configured for “.graphql” files: src/graphql/entries/analysis-jobs/type-defs.graphql
src/graphql/entries/analysis-jobs/index.ts:2:21: 2 │ import typeDefs from './type-defs.graphql'
I’ve been trying to find out how to fix this. I think I need to install an esbuild plugin called @luckycatfactory/esbuild-graphql-loader (I am bit concerned that this was last updated in 2022).
However, I can’t work out how to translate the configuration instructions here:
Into something that works in serverless.yaml as described here:
Has anyone else encountered this issue, and have you managed to solve it?