From 4956cf0e89b35647fa210a778e17c508b8fd3e40 Mon Sep 17 00:00:00 2001 From: Vadym Mykhailov Date: Fri, 20 Dec 2024 16:56:05 +0100 Subject: [PATCH] fix(config): Add logic for Sass config extending --- package.json | 2 +- utils/renderSass.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ac617f9..aec2371 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netcentric/fe-build", - "version": "4.0.2", + "version": "4.0.3", "description": "Frontend build tools for AEM projects.", "license": "Apache-2.0", "author": "Cognizant Netcentric (https://www.netcentric.biz)", diff --git a/utils/renderSass.js b/utils/renderSass.js index 59260e2..608ea75 100644 --- a/utils/renderSass.js +++ b/utils/renderSass.js @@ -6,7 +6,7 @@ const { log } = require('./log'); module.exports = function renderSass(dest, file, config, cb, write = false) { // extract sass only configs - const { outputStyle, includePaths, failOnError } = config.sass; + const { outputStyle, includePaths, failOnError, ...sassConfigOptions } = config.sass; // proper extension const destFile = dest.replace('.scss', '.css'); @@ -20,7 +20,8 @@ module.exports = function renderSass(dest, file, config, cb, write = false) { outputStyle, includePaths, outFile, - sourceMap: !config.general.isProduction + sourceMap: !config.general.isProduction, + ...sassConfigOptions }, (error, result) => { // log if there are any errors if (error) {