Skip to content

Commit

Permalink
feat(Templates): Switch to esbuild in aws-nodejs-typescript (#9962)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriencaccia committed Sep 16, 2021
1 parent 28d230f commit aaabb50
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 68 deletions.
Expand Up @@ -19,14 +19,10 @@
"@types/node": "^14.14.25",
"json-schema-to-ts": "^1.5.0",
"serverless": "^2.23.0",
"serverless-webpack": "^5.3.5",
"ts-loader": "^8.0.15",
"serverless-esbuild": "^1.17.1",
"ts-node": "^9.1.1",
"tsconfig-paths": "^3.9.0",
"tsconfig-paths-webpack-plugin": "^3.3.0",
"typescript": "^4.1.3",
"webpack": "^5.20.2",
"webpack-node-externals": "^2.5.2"
"typescript": "^4.1.3"
},
"author": "The serverless webpack authors (https://github.com/elastic-coders/serverless-webpack)",
"license": "MIT"
Expand Down
13 changes: 9 additions & 4 deletions lib/plugins/create/templates/aws-nodejs-typescript/serverless.ts
Expand Up @@ -6,12 +6,17 @@ const serverlessConfiguration: AWS = {
service: 'aws-nodejs-typescript',
frameworkVersion: '2',
custom: {
webpack: {
webpackConfig: './webpack.config.js',
includeModules: true,
esbuild: {
bundle: true,
minify: false,
sourcemap: true,
exclude: ['aws-sdk'],
target: 'node14',
define: { 'require.resolve': undefined },
platform: 'node',
},
},
plugins: ['serverless-webpack'],
plugins: ['serverless-esbuild'],
provider: {
name: 'aws',
runtime: 'nodejs14.x',
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion test/unit/lib/plugins/create/create.test.js
Expand Up @@ -223,7 +223,6 @@ describe('Create', () => {
expect(dirContent).to.include(path.join('src', 'libs', 'lambda.ts'));
expect(dirContent).to.include('tsconfig.json');
expect(dirContent).to.include('tsconfig.paths.json');
expect(dirContent).to.include('webpack.config.js');
});
});

Expand Down

0 comments on commit aaabb50

Please sign in to comment.