Few days ago I found that sometime transpile from SASS to CSS was failed because of following error:
TypeError: Cannot read property 'toString' of undefined
at Promise.then.res (postcss-node-sass/index.js:38:42)
I investigated the reason why this error was occurred. PostCSS pass result parameter to each plugin. For some reasons, sometime result.opts.to is null, and in this case, node-sass doesn't generate source map because opt.outFile is not specified (postcss-node-sass/index.js#L27, node-sass/index.js#L54-L56).
To handle this case, I did small fix. Please review it.
First, thank you for this useful plugin!
Few days ago I found that sometime transpile from SASS to CSS was failed because of following error:
I investigated the reason why this error was occurred. PostCSS pass
result
parameter to each plugin. For some reasons, sometimeresult.opts.to
isnull
, and in this case, node-sass doesn't generate source map becauseopt.outFile
is not specified (postcss-node-sass/index.js#L27, node-sass/index.js#L54-L56).To handle this case, I did small fix. Please review it.
Thanks.