There was an error while loading. Please reload this page.
1 parent 911a774 commit 462ae5fCopy full SHA for 462ae5f
lib/loader.js
@@ -21,7 +21,6 @@ const asyncSassJobQueue = async.queue(sass.render, threadPoolSize - 1);
21
* @param {string} content
22
*/
23
function sassLoader(content) {
24
- content = content || '//';
25
const callback = this.async();
26
const isSync = typeof callback !== "function";
27
const self = this;
@@ -44,6 +43,12 @@ function sassLoader(content) {
44
43
addNormalizedDependency
45
));
46
+ // Skip empty files, otherwise it will stop webpack, see issue #21
47
+ if (options.data.trim() === "") {
48
+ callback(null, "");
49
+ return;
50
+ }
51
+
52
// start the actual rendering
53
asyncSassJobQueue.push(options, (err, result) => {
54
if (err) {
0 commit comments