Skip to content

Commit

Permalink
feat(Templates): Package lambdas individually in aws-nodejs-typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia committed Oct 28, 2021
1 parent 4448490 commit 3aab5f8
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions lib/plugins/create/templates/aws-nodejs-typescript/serverless.ts
Expand Up @@ -5,17 +5,6 @@ import hello from '@functions/hello';
const serverlessConfiguration: AWS = {
service: 'aws-nodejs-typescript',
frameworkVersion: '2',
custom: {
esbuild: {
bundle: true,
minify: false,
sourcemap: true,
exclude: ['aws-sdk'],
target: 'node14',
define: { 'require.resolve': undefined },
platform: 'node',
},
},
plugins: ['serverless-esbuild'],
provider: {
name: 'aws',
Expand All @@ -32,6 +21,19 @@ const serverlessConfiguration: AWS = {
},
// import the function via paths
functions: { hello },
package: { individually: true },
custom: {
esbuild: {
bundle: true,
minify: false,
sourcemap: true,
exclude: ['aws-sdk'],
target: 'node14',
define: { 'require.resolve': undefined },
platform: 'node',
concurrency: 10,
},
},
};

module.exports = serverlessConfiguration;

0 comments on commit 3aab5f8

Please sign in to comment.