Reputation: 2018
I have just upgraded to Serverless V4, and removed serverless-bundle as recommended.
Have configured esbuild with a loader:
loader:{
'.html': 'copy',
'.node': 'copy',
".png": 'copy',
},
We can see the fucntion createAuthChallenge (Cognito custom auth handler) is packaged with an html email loginLink
(correct). This file is statically imported to the TS source. When I unzip the SLS zip, that html is not there (the lambda itself throws a missing module error of course).
In serverless.yml I have tried:
package:
individually: true
patterns:
- '*.pdf'
- '**/*.pdf'
Separately, the download html and sharp files should not be packaged as they are not imported anywhere in this function, but we can look at that later. (the built js shows and import for these files, but it's not used).
How do I make Serverless V4 Build include these html files in the zip??
This is the same situation across all our zips/functions/html emails.
Upvotes: 0
Views: 18