Skip to content

Commit 7d14278

Browse files
authored
change Buffer.from to new Buffer
1 parent 127cd78 commit 7d14278

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/SourceMapDevToolPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class SourceMapDevToolPlugin {
153153
} else {
154154
asset.__SourceMapDevToolData[file] = compilation.assets[file] = new ConcatSource(new RawSource(source), currentSourceMappingURLComment
155155
.replace(/\[map\]/g, () => JSON.stringify(sourceMap))
156-
.replace(/\[url\]/g, () => `data:application/json;charset=utf-8;base64,${Buffer.from(JSON.stringify(sourceMap)).toString("base64")}`)
156+
.replace(/\[url\]/g, () => `data:application/json;charset=utf-8;base64,${new Buffer(JSON.stringify(sourceMap), "utf-8").toString("base64")}`) // eslint-disable-line
157157
);
158158
}
159159
});

0 commit comments

Comments
 (0)