serverless-build-plugin
Advanced tools
Comparing version 2.0.3 to 2.1.0
@@ -90,3 +90,3 @@ "use strict"; | ||
var _this = this; | ||
var builderFilePath, result, entryRelPath, entryPoint, buildFilename, webpackConfig, externals; | ||
var builderFilePath, entryRelPath, entryPoint, buildFilename, result, webpackConfig, externals; | ||
return __generator(this, function (_a) { | ||
@@ -101,5 +101,8 @@ switch (_a.label) { | ||
builderFilePath = path.resolve(this.servicePath, builderFilePath); | ||
entryRelPath = "" + fnConfig.handler.split(/\.[^.]+$/)[0]; | ||
entryPoint = "./" + entryRelPath + "." + this.handlerEntryExt; | ||
buildFilename = "./" + entryRelPath + ".js"; | ||
result = require(builderFilePath); | ||
if (!lutils_1.isFunction(result)) return [3 /*break*/, 3]; | ||
return [4 /*yield*/, Bluebird.try(function () { return result(fnConfig, _this); })]; | ||
return [4 /*yield*/, Bluebird.try(function () { return result(fnConfig, _this, { entryRelPath: entryRelPath, entryPoint: entryPoint, buildFilename: buildFilename }); })]; | ||
case 2: | ||
@@ -109,5 +112,2 @@ result = _a.sent(); | ||
case 3: | ||
entryRelPath = "" + fnConfig.handler.split(/\.[^.]+$/)[0]; | ||
entryPoint = "./" + entryRelPath + "." + this.handlerEntryExt; | ||
buildFilename = "./" + entryRelPath + ".js"; | ||
if (!lutils_1.isObject(result)) return [3 /*break*/, 6]; | ||
@@ -114,0 +114,0 @@ webpackConfig = lutils_1.clone(result); |
{ | ||
"name": "serverless-build-plugin", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "A Node.js focused build optimizer plugin for serverless", | ||
@@ -5,0 +5,0 @@ "main": "./index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147290