From 3f22a06484cfec09d25e0f2aebb9c9d9097ebf28 Mon Sep 17 00:00:00 2001 From: Athorcis Date: Sun, 3 Sep 2023 20:29:29 +0200 Subject: [PATCH 1/2] feat: add an option change sass implementation --- index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index d2f9f5d..6ddb3ce 100644 --- a/index.js +++ b/index.js @@ -16,12 +16,17 @@ module.exports = exports = function sassExtractLoader(content) { const query = loaderUtils.getOptions(this);; const plugins = (query ? query.plugins : []) || []; + const extractOptions = { plugins }; - return sassExtract.render(Object.assign({}, query, { file: this.resourcePath }), { plugins }) + if (query.implementation) { + extractOptions.implementation = query.implementation; + } + + return sassExtract.render(Object.assign({}, query, { file: this.resourcePath }), extractOptions) .then(rendered => { this.value = [rendered.vars]; const result = `module.exports = ${JSON.stringify(rendered.vars)};`; - + rendered.stats.includedFiles.forEach(includedFile => { this.addDependency(normalizeDependency(includedFile)); }); @@ -34,4 +39,4 @@ module.exports = exports = function sassExtractLoader(content) { } callback(err); }); -}; \ No newline at end of file +}; From a82b0cebdc58f8e3d61d6b0e3cc78ddf25d9672c Mon Sep 17 00:00:00 2001 From: Athorcis Date: Thu, 26 Oct 2023 17:59:26 +0200 Subject: [PATCH 2/2] feat: add sass-extract 3.0.0 to list of supported versions --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8abac7..6309c72 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "peerDependencies": { "webpack": "^3 || ^2 || ^2.2.0-rc.0 || ^2.1.0-beta || ^1.12.6", - "sass-extract": "^1.0.1 || ^2.0.0" + "sass-extract": "^1.0.1 || ^2.0.0 || ^3.0.0" }, "devDependencies": { "bluebird": "^3.4.7",