Skip to content

Commit

Permalink
Convert string to buffer to prevent os specific encoding from grunt.file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Zörb committed Jun 21, 2020
1 parent 2e72732 commit 33338c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tasks/critical.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ module.exports = grunt => {
grunt.file.mkdir(dirname);
}

grunt.file.write(destination, output);
grunt.file.write(
destination,
Buffer.from(output)
);
// Print a success message.
grunt.log.ok(`File "${destination}" created.`);
return output;
Expand Down

0 comments on commit 33338c2

Please sign in to comment.