Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ module.exports = function(ServerlessPlugin) {

// Minify browserified data

if (_this.function.custom.optimize && _this.function.custom.optimize.minify !== false) {
if (_this.config.minify !== false) {

let result = UglifyJS.minify(_this.pathBundled, uglyOptions);

Expand Down Expand Up @@ -257,10 +257,10 @@ module.exports = function(ServerlessPlugin) {
fullPath;

// Skip if undefined
if (!_this.function.custom.includePaths) return compressPaths;
if (!_this.config.includePaths) return compressPaths;

// Collect includePaths
_this.function.custom.includePaths.forEach(p => {
_this.config.includePaths.forEach(p => {

try {
fullPath = path.resolve(path.join(_this.evt.data.pathDist, p));
Expand Down Expand Up @@ -305,4 +305,4 @@ module.exports = function(ServerlessPlugin) {
}

return ServerlessOptimizer;
};
};