diff --git a/src/SassError.js b/src/SassError.js index d602aa9e..c0a8cc57 100644 --- a/src/SassError.js +++ b/src/SassError.js @@ -7,7 +7,6 @@ class SassError extends Error { // Instruct webpack to hide the JS stack from the console. // Usually you're only interested in the SASS error in this case. this.hideStack = true; - Error.captureStackTrace(this, this.constructor); if ( typeof sassError.line !== "undefined" || @@ -25,10 +24,7 @@ class SassError extends Error { }`; if (sassError.formatted) { - this.message = `${this.name}: ${sassError.formatted.replace( - /^Error: /, - "" - )}`; + this.message = sassError.formatted.replace(/^Error: /, ""); } } } diff --git a/src/index.js b/src/index.js index a10d90d5..0badec73 100644 --- a/src/index.js +++ b/src/index.js @@ -21,10 +21,13 @@ import SassError from "./SassError"; async function loader(content) { const options = this.getOptions(schema); const callback = this.async(); - const implementation = getSassImplementation(this, options.implementation); - if (!implementation) { - callback(); + let implementation; + + try { + implementation = getSassImplementation(this, options.implementation); + } catch (error) { + callback(error); return; } @@ -59,7 +62,14 @@ async function loader(content) { } } - const compile = getCompileFn(implementation, options); + let compile; + + try { + compile = getCompileFn(implementation, options); + } catch (error) { + callback(error); + return; + } let result; diff --git a/src/utils.js b/src/utils.js index aa7a8bb7..fff4c855 100644 --- a/src/utils.js +++ b/src/utils.js @@ -36,43 +36,24 @@ function getSassImplementation(loaderContext, implementation) { let resolvedImplementation = implementation; if (!resolvedImplementation) { - try { - resolvedImplementation = getDefaultSassImplementation(); - } catch (error) { - loaderContext.emitError(error); - - return; - } + resolvedImplementation = getDefaultSassImplementation(); } if (typeof resolvedImplementation === "string") { - try { - // eslint-disable-next-line import/no-dynamic-require, global-require - resolvedImplementation = require(resolvedImplementation); - } catch (error) { - loaderContext.emitError(error); - - // eslint-disable-next-line consistent-return - return; - } + // eslint-disable-next-line import/no-dynamic-require, global-require + resolvedImplementation = require(resolvedImplementation); } const { info } = resolvedImplementation; if (!info) { - loaderContext.emitError(new Error("Unknown Sass implementation.")); - - return; + throw new Error("Unknown Sass implementation."); } const infoParts = info.split("\t"); if (infoParts.length < 2) { - loaderContext.emitError( - new Error(`Unknown Sass implementation "${info}".`) - ); - - return; + throw new Error(`Unknown Sass implementation "${info}".`); } const [implementationName] = infoParts; @@ -88,9 +69,7 @@ function getSassImplementation(loaderContext, implementation) { return resolvedImplementation; } - loaderContext.emitError( - new Error(`Unknown Sass implementation "${implementationName}".`) - ); + throw new Error(`Unknown Sass implementation "${implementationName}".`); } /** diff --git a/test/__snapshots__/implementation-option.test.js.snap b/test/__snapshots__/implementation-option.test.js.snap index fa5717ee..7f3c6062 100644 --- a/test/__snapshots__/implementation-option.test.js.snap +++ b/test/__snapshots__/implementation-option.test.js.snap @@ -38,7 +38,7 @@ exports[`implementation option not specify: warnings 1`] = `[]`; exports[`implementation option should not swallow an error when trying to load a sass implementation: errors 1`] = ` [ - "ModuleError: Module Error (from ../src/cjs.js): + "ModuleBuildError: Module build failed (from ../src/cjs.js): Some error", ] `; @@ -47,8 +47,8 @@ exports[`implementation option should not swallow an error when trying to load a exports[`implementation option should throw an error on an unknown sass implementation: errors 1`] = ` [ - "ModuleError: Module Error (from ../src/cjs.js): -Unknown Sass implementation "strange-sass".", + "ModuleBuildError: Module build failed (from ../src/cjs.js): +Error: Unknown Sass implementation "strange-sass".", ] `; @@ -56,8 +56,8 @@ exports[`implementation option should throw an error on an unknown sass implemen exports[`implementation option should throw an error when the "info" is unparseable: errors 1`] = ` [ - "ModuleError: Module Error (from ../src/cjs.js): -Unknown Sass implementation "asdfj".", + "ModuleBuildError: Module build failed (from ../src/cjs.js): +Error: Unknown Sass implementation "asdfj".", ] `; @@ -65,8 +65,8 @@ exports[`implementation option should throw an error when the "info" is unparsea exports[`implementation option should throw error when the "info" does not exist: errors 1`] = ` [ - "ModuleError: Module Error (from ../src/cjs.js): -Unknown Sass implementation.", + "ModuleBuildError: Module build failed (from ../src/cjs.js): +Error: Unknown Sass implementation.", ] `; @@ -74,8 +74,8 @@ exports[`implementation option should throw error when the "info" does not exist exports[`implementation option should throw error when unresolved package: errors 1`] = ` [ - "ModuleError: Module Error (from ../src/cjs.js): -Cannot find module 'unresolved' from 'src/utils.js'", + "ModuleBuildError: Module build failed (from ../src/cjs.js): +Error: Cannot find module 'unresolved' from 'src/utils.js'", ] `; @@ -83,7 +83,7 @@ exports[`implementation option should throw error when unresolved package: warni exports[`implementation option should try to load using valid order: errors 1`] = ` [ - "ModuleError: Module Error (from ../src/cjs.js): + "ModuleBuildError: Module build failed (from ../src/cjs.js): Some error sass", ] `; diff --git a/test/__snapshots__/loader.test.js.snap b/test/__snapshots__/loader.test.js.snap index b998c40c..dd810724 100644 --- a/test/__snapshots__/loader.test.js.snap +++ b/test/__snapshots__/loader.test.js.snap @@ -467,7 +467,7 @@ exports[`loader should load only sass/scss files for the "mainFiles" ('sass-embe exports[`loader should not use .import.sass files ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -485,7 +485,7 @@ exports[`loader should not use .import.sass files ('dart-sass', 'modern' API, 's exports[`loader should not use .import.sass files ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -503,7 +503,7 @@ exports[`loader should not use .import.sass files ('sass-embedded', 'modern' API exports[`loader should not use .import.scss files ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -521,7 +521,7 @@ exports[`loader should not use .import.scss files ('dart-sass', 'modern' API, 's exports[`loader should not use .import.scss files ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -539,7 +539,7 @@ exports[`loader should not use .import.scss files ('sass-embedded', 'modern' API exports[`loader should output an understandable error ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Expected newline.", +Expected newline.", ] `; @@ -548,7 +548,7 @@ exports[`loader should output an understandable error ('dart-sass', 'legacy' API exports[`loader should output an understandable error ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: expected "{".", +expected "{".", ] `; @@ -575,7 +575,7 @@ exports[`loader should output an understandable error ('dart-sass', 'modern' API exports[`loader should output an understandable error ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Invalid CSS after "a {": expected "}", was "{}"", +Invalid CSS after "a {": expected "}", was "{}"", ] `; @@ -584,7 +584,7 @@ exports[`loader should output an understandable error ('node-sass', 'legacy' API exports[`loader should output an understandable error ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: property "some-value" must be followed by a ':'", +property "some-value" must be followed by a ':'", ] `; @@ -593,7 +593,7 @@ exports[`loader should output an understandable error ('node-sass', 'legacy' API exports[`loader should output an understandable error ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Expected newline.", +Expected newline.", ] `; @@ -602,7 +602,7 @@ exports[`loader should output an understandable error ('sass-embedded', 'legacy' exports[`loader should output an understandable error ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: expected "{".", +expected "{".", ] `; @@ -629,7 +629,7 @@ exports[`loader should output an understandable error ('sass-embedded', 'modern' exports[`loader should output an understandable error when a file could not be found ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -638,7 +638,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -665,7 +665,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: File to import not found or unreadable: does-not-exist.", +File to import not found or unreadable: does-not-exist.", ] `; @@ -674,7 +674,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: File to import not found or unreadable: does-not-exist.", +File to import not found or unreadable: does-not-exist.", ] `; @@ -683,7 +683,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -692,7 +692,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -719,7 +719,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found using "@use" rule ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -728,7 +728,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found using "@use" rule ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -755,7 +755,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found using "@use" rule ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -764,7 +764,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when a file could not be found using "@use" rule ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -791,7 +791,7 @@ exports[`loader should output an understandable error when a file could not be f exports[`loader should output an understandable error when the problem in "@import" ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Expected newline.", +Expected newline.", ] `; @@ -800,7 +800,7 @@ exports[`loader should output an understandable error when the problem in "@impo exports[`loader should output an understandable error when the problem in "@import" ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: expected "{".", +expected "{".", ] `; @@ -827,7 +827,7 @@ exports[`loader should output an understandable error when the problem in "@impo exports[`loader should output an understandable error when the problem in "@import" ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Invalid CSS after "a {": expected "}", was "{}"", +Invalid CSS after "a {": expected "}", was "{}"", ] `; @@ -836,7 +836,7 @@ exports[`loader should output an understandable error when the problem in "@impo exports[`loader should output an understandable error when the problem in "@import" ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: property "some-value" must be followed by a ':'", +property "some-value" must be followed by a ':'", ] `; @@ -845,7 +845,7 @@ exports[`loader should output an understandable error when the problem in "@impo exports[`loader should output an understandable error when the problem in "@import" ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Expected newline.", +Expected newline.", ] `; @@ -854,7 +854,7 @@ exports[`loader should output an understandable error when the problem in "@impo exports[`loader should output an understandable error when the problem in "@import" ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: expected "{".", +expected "{".", ] `; @@ -881,7 +881,7 @@ exports[`loader should output an understandable error when the problem in "@impo exports[`loader should output an understandable error with a problem in "@use" ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Expected newline.", +Expected newline.", ] `; @@ -890,7 +890,7 @@ exports[`loader should output an understandable error with a problem in "@use" ( exports[`loader should output an understandable error with a problem in "@use" ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: expected "{".", +expected "{".", ] `; @@ -917,7 +917,7 @@ exports[`loader should output an understandable error with a problem in "@use" ( exports[`loader should output an understandable error with a problem in "@use" ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Expected newline.", +Expected newline.", ] `; @@ -926,7 +926,7 @@ exports[`loader should output an understandable error with a problem in "@use" ( exports[`loader should output an understandable error with a problem in "@use" ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: expected "{".", +expected "{".", ] `; @@ -2391,7 +2391,7 @@ exports[`loader should support resolving using the "file" schema ('sass-embedded exports[`loader should throw an error on ambiguous import (only on "dart-sass") ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: It's not clear which file to import. Found:", +It's not clear which file to import. Found:", ] `; @@ -2400,7 +2400,7 @@ exports[`loader should throw an error on ambiguous import (only on "dart-sass") exports[`loader should throw an error on ambiguous import (only on "dart-sass") ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: It's not clear which file to import. Found:", +It's not clear which file to import. Found:", ] `; @@ -2435,7 +2435,7 @@ exports[`loader should throw an error on ambiguous import (only on "dart-sass") exports[`loader should throw an error on ambiguous import (only on "dart-sass") ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Error: It's not clear which file to import. Found:", +Error: It's not clear which file to import. Found:", ] `; @@ -2444,7 +2444,7 @@ exports[`loader should throw an error on ambiguous import (only on "dart-sass") exports[`loader should throw an error on ambiguous import (only on "dart-sass") ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Error: It's not clear which file to import. Found:", +Error: It's not clear which file to import. Found:", ] `; @@ -2471,7 +2471,7 @@ exports[`loader should throw an error on ambiguous import (only on "dart-sass") exports[`loader should throw an error on circular import ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: This file is already being loaded.", +This file is already being loaded.", ] `; @@ -2480,7 +2480,7 @@ exports[`loader should throw an error on circular import ('dart-sass', 'legacy' exports[`loader should throw an error on circular import ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: This file is already being loaded.", +This file is already being loaded.", ] `; @@ -2507,7 +2507,7 @@ exports[`loader should throw an error on circular import ('dart-sass', 'modern' exports[`loader should throw an error on circular import ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: An @import loop has been found:", +An @import loop has been found:", ] `; @@ -2516,7 +2516,7 @@ exports[`loader should throw an error on circular import ('node-sass', 'legacy' exports[`loader should throw an error on circular import ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: An @import loop has been found:", +An @import loop has been found:", ] `; @@ -2525,7 +2525,7 @@ exports[`loader should throw an error on circular import ('node-sass', 'legacy' exports[`loader should throw an error on circular import ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: This file is already being loaded.", +This file is already being loaded.", ] `; @@ -2534,7 +2534,7 @@ exports[`loader should throw an error on circular import ('sass-embedded', 'lega exports[`loader should throw an error on circular import ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: This file is already being loaded.", +This file is already being loaded.", ] `; @@ -2561,7 +2561,7 @@ exports[`loader should throw an error on circular import ('sass-embedded', 'mode exports[`loader should throw an error on circular use ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Module loop: this module is already being loaded.", +Module loop: this module is already being loaded.", ] `; @@ -2570,7 +2570,7 @@ exports[`loader should throw an error on circular use ('dart-sass', 'legacy' API exports[`loader should throw an error on circular use ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: This file is already being loaded.", +This file is already being loaded.", ] `; @@ -2597,7 +2597,7 @@ exports[`loader should throw an error on circular use ('dart-sass', 'modern' API exports[`loader should throw an error on circular use ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Module loop: this module is already being loaded.", +Module loop: this module is already being loaded.", ] `; @@ -2606,7 +2606,7 @@ exports[`loader should throw an error on circular use ('sass-embedded', 'legacy' exports[`loader should throw an error on circular use ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: This file is already being loaded.", +This file is already being loaded.", ] `; @@ -2633,7 +2633,7 @@ exports[`loader should throw an error on circular use ('sass-embedded', 'modern' exports[`loader should throw an error with a explicit file and a file does not exist ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -2642,7 +2642,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -2669,7 +2669,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist ('node-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: File to import not found or unreadable: ./another/_module.scss.", +File to import not found or unreadable: ./another/_module.scss.", ] `; @@ -2678,7 +2678,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist ('node-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: File to import not found or unreadable: ./another/_module.scss.", +File to import not found or unreadable: ./another/_module.scss.", ] `; @@ -2687,7 +2687,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -2696,7 +2696,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -2723,7 +2723,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist using "@use" rule ('dart-sass', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -2732,7 +2732,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist using "@use" rule ('dart-sass', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -2759,7 +2759,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist using "@use" rule ('sass-embedded', 'legacy' API, 'sass' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `; @@ -2768,7 +2768,7 @@ exports[`loader should throw an error with a explicit file and a file does not e exports[`loader should throw an error with a explicit file and a file does not exist using "@use" rule ('sass-embedded', 'legacy' API, 'scss' syntax): errors 1`] = ` [ "ModuleBuildError: Module build failed (from ../src/cjs.js): -SassError: Can't find stylesheet to import.", +Can't find stylesheet to import.", ] `;