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

cant import middleware as es6 module

Open JOEAV opened this issue 3 years ago • 5 comments

Hey, i'm trying to consume the middleware module as esm moudle with no luck tried import {eventContext} from '@vendia/serverless-express/middleware' but got an error stating there is no such module.

how can import the middleware (in order to get the eventContext) in a modern way (i'm using version 3.4.0) p.s all the examples in docs wont show how to use import but only the require way . thanks

JOEAV avatar Jun 09 '22 15:06 JOEAV

I've added the "help wanted" label if someone wants to add support

brettstack avatar Jun 09 '22 20:06 brettstack

Have you tried with

import * as awsServerlessExpress from "aws-serverless-express"

marcodali avatar Oct 23 '23 00:10 marcodali