Skip to content

Commit

Permalink
Use Buffer.from
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeembrey committed May 24, 2018
1 parent 45664e7 commit 4f40026
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Expand Up @@ -527,7 +527,7 @@ function readThrough (
* Update the output remapping the source map.
*/
function updateOutput (outputText: string, fileName: string, sourceMap: string, getExtension: (fileName: string) => string) {
const base64Map = new Buffer(updateSourceMap(sourceMap, fileName), 'utf8').toString('base64')
const base64Map = Buffer.from(updateSourceMap(sourceMap, fileName), 'utf8').toString('base64')
const sourceMapContent = `data:application/json;charset=utf-8;base64,${base64Map}`
const sourceMapLength = `${basename(fileName)}.map`.length + (getExtension(fileName).length - extname(fileName).length)

Expand Down

0 comments on commit 4f40026

Please sign in to comment.