Skip to content

Commit ce5c02a

Browse files
author
Frank Schmid
committed
Fixed wrong check for TS config after configuration change.
1 parent 7f1062b commit ce5c02a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ class ServerlessWebpack {
2727
this.options = options;
2828

2929
if (
30-
_.has(this.serverless, 'service.custom.webpack') &&
31-
_.endsWith(this.serverless.service.custom.webpack, '.ts')
30+
(_.has(this.serverless, 'service.custom.webpack') &&
31+
_.isString(this.serverless.service.custom.webpack) &&
32+
_.endsWith(this.serverless.service.custom.webpack, '.ts')) ||
33+
(_.has(this.serverless, 'service.custom.webpack.webpackConfig') &&
34+
_.endsWith(this.serverless.service.custom.webpack.webpackConfig, '.ts'))
3235
) {
3336
require('ts-node/register');
3437
}

0 commit comments

Comments
 (0)