aws-sam-webpack-plugin icon indicating copy to clipboard operation
aws-sam-webpack-plugin copied to clipboard

Question about how to override template parameter during webpack building

Open ranmocy opened this issue 3 years ago • 2 comments

I'm trying to conditionally declare entry point based on the different template parameter (dev,beta,prod). It should affect the output of webpack since the build is based on the entry points declared in the template.

How does the plugin resolve the entry points in the templates? What value will be used for those parameters?

ranmocy avatar Aug 16 '22 16:08 ranmocy

The plugin looks for AWS::Serverless::Function resources in your SAM template then uses the configured entry point for the function.

buggy avatar Aug 27 '22 12:08 buggy

The plugin looks for AWS::Serverless::Function resources in your SAM template then uses the configured entry point for the function.

And hoy you managed to build correctly when the lambda entry point app.ts has more files and folders at the same level of app.ts. How would be the webpack.config? Because I´ve the problem that only generates the build of app.ts in the correct path but the rest of the files are generated in the root outside of .aws-sam folder. Help image

OscarJVD avatar Apr 28 '24 01:04 OscarJVD