You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On browser (tested with Firefox and Chrome), If i try to use sass.importer with sass.compilefile, sass.js hangs and eventually throws a "uncaught exception: abort(31). Build with -s ASSERTIONS=1 for more info."
To reproduce :
index.html
<html><head><scriptsrc="node_modules/sass.js/dist/sass.js"></script><script>varsass=newSass();sass.importer(function(request,done){console.log("importer request: ",request);if(request.path){// Sass.js already found a file,// we probably want to just load thatdone();}elseif(request.current==='content'){// provide a specific content// (e.g. downloaded on demand)done({content: '.some { content: "from anywhere"; }'})}elseif(request.current==='error'){// provide content directly// note that there is no cachedone({error: 'import failed because bacon.'})}else{// let libsass handle the importdone();}});varbase='../../../';vardirectory='';// preload a set of filessass.preloadFiles(base,directory,["scss/main.scss"],functioncallback(){sass.compile(`@import "error"; div { background-color: green;}`,function(result){console.log("compile : ",result);});sass.compileFile("scss/main.scss",function(result){console.log("compileFile : ",result);});});</script></head><body></body></html>
scss/main.scss
@import"error";
div {
background-color: red;
}
Console output :
// Here works OK as compiles with sass.compile
11:07:45.518 importer request: Object { current: "error", previous: "stdin", resolved: "/sass/error", path: null, options: null }
11:07:45.564 compile : Object { status: 1, file: "stdin", line: 1, column: 9, message: "import failed because bacon.", formatted: "Error: import failed because bacon.\n on line 1:9 of /stdin\n>> @import \"error\"; div { background-color: green;}\n --------^\n" }
// Here hangs when tries with sass.compileFile
11:07:45.571 importer request: Object { current: "error", previous: "/sass/scss/main.scss", resolved: "/sass/scss/error", path: null, options: null }
11:08:29.059 31 sass.worker.js:5:15099
11:08:29.059 31 sass.worker.js:5:15109
11:08:29.060
uncaught exception: abort(31). Build with -s ASSERTIONS=1 for more info. sass.worker.js:5:416751
invoke_vii http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:5
$Y http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:24
fFa http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:27
Eda http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:24
sxa http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:27
lfa http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:24
Lc http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:23
My http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:10
fw http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:10
Lc http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:23
qz http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:10
resume http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:5
_emscripten_sleep http://localhost:1234/node_modules/sass.js/dist/sass.worker.js:5
If you change '@import "error";' for '@import "content";' fails on the same way. Same thing if you remove the call to sass.compile and keep alone the sass.compileFile .
The text was updated successfully, but these errors were encountered:
On browser (tested with Firefox and Chrome), If i try to use sass.importer with sass.compilefile, sass.js hangs and eventually throws a "uncaught exception: abort(31). Build with -s ASSERTIONS=1 for more info."
To reproduce :
index.html
scss/main.scss
Console output :
If you change '@import "error";' for '@import "content";' fails on the same way. Same thing if you remove the call to sass.compile and keep alone the sass.compileFile .
The text was updated successfully, but these errors were encountered: