File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
source/constructs/lib/back-end Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,20 @@ export class BackEnd extends Construct {
106106 DEFAULT_FALLBACK_IMAGE_BUCKET : props . fallbackImageS3Bucket ,
107107 DEFAULT_FALLBACK_IMAGE_KEY : props . fallbackImageS3KeyBucket ,
108108 } ,
109+ bundling : {
110+ externalModules : [ "sharp" ] ,
111+ commandHooks : {
112+ beforeBundling ( inputDir : string , outputDir : string ) : string [ ] {
113+ return [ ] ;
114+ } ,
115+ beforeInstall ( inputDir : string , outputDir : string ) : string [ ] {
116+ return [ ] ;
117+ } ,
118+ afterBundling ( inputDir : string , outputDir : string ) : string [ ] {
119+ return [ `cd ${ outputDir } ` , "npm install --arch=x64 --platform=linux sharp" ] ;
120+ } ,
121+ } ,
122+ } ,
109123 } ) ;
110124
111125 const imageHandlerLogGroup = new LogGroup ( this , "ImageHandlerLogGroup" , {
You can’t perform that action at this time.
0 commit comments