You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cognito-at-edge package is designed to be deployed to Lambda@Edge.
Lambda@Edge does not support Lambda layers, and the function size limit is up to 1 MB.
Consequently, some form of bundlers is required to deploy cognito-at-edge.
(Running npm i cognito-at-edge resulted in a node_modules directory size of >1MB)
Unlike the sample repo, I adopted terraform for IaC and Vite as a bundler.
The build and deploy processes worked fine, but I encountered the following runtime error:
TypeError: (0 , $.default) is not a function
at new D (/.../dist/node_modules/cognito-at-edge/dist/index.js:1:1995)
at t (/.../dist/index.js:1:499)
Node.js v18.18.0
By forking this repository, setting esModuleInterop = true, and running npm run build, the error was resolved.
The text was updated successfully, but these errors were encountered:
What would you like to be added:
in tsconfig.json:
{ "compilerOptions": { + "esModuleInterop": true }, ... }
Why is this needed:
The cognito-at-edge package is designed to be deployed to Lambda@Edge.
Lambda@Edge does not support Lambda layers, and the function size limit is up to 1 MB.
Consequently, some form of bundlers is required to deploy cognito-at-edge.
(Running
npm i cognito-at-edge
resulted in a node_modules directory size of >1MB)Unlike the sample repo, I adopted terraform for IaC and Vite as a bundler.
The build and deploy processes worked fine, but I encountered the following runtime error:
By forking this repository, setting
esModuleInterop = true
, and runningnpm run build
, the error was resolved.The text was updated successfully, but these errors were encountered: