Skip to content

Commit 69fc17c

Browse files
committed
load css files in binary encoding
1 parent e7cb90f commit 69fc17c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/load.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,16 @@ var Loader = function (data) {
135135
* @return {Promise}
136136
*/
137137
function loadCssFileFromUrl(absoluteUrl, localFilePath) {
138-
return request.getAsync(absoluteUrl)
138+
return request.getAsync({
139+
url: absoluteUrl,
140+
method: 'GET',
141+
encoding: null
142+
})
139143
.then(function (response) {
140-
return loadCssSources(response[1], absoluteUrl, localFilePath)
144+
return loadCssSources(response[1].toString(encoding), absoluteUrl, localFilePath)
141145
})
142146
.then(function (response) {
143-
return fs.outputFileAsync(localFilePath, response)
147+
return fs.outputFileAsync(localFilePath, response, {encoding: encoding})
144148
})
145149
.then(function () {
146150
logger.log(absoluteUrl + ' -> ' + localFilePath);

0 commit comments

Comments
 (0)