Skip to content

Commit 7e2b208

Browse files
akphijantimon
authored andcommitted
fix: keep binary format when adding assets
#1537
1 parent c697725 commit 7e2b208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ function hookIntoCompiler (compiler, options, plugin) {
469469
function addFileToAssets (filename, compilation) {
470470
filename = path.resolve(compilation.compiler.context, filename);
471471
return fsReadFileAsync(filename)
472-
.then(source => new webpack.sources.RawSource(source, true))
472+
.then(source => new webpack.sources.RawSource(source, false))
473473
.catch(() => Promise.reject(new Error('HtmlWebpackPlugin: could not load file ' + filename)))
474474
.then(rawSource => {
475475
const basename = path.basename(filename);

0 commit comments

Comments
 (0)