Skip to content

Commit

Permalink
fix: keep binary format when adding assets
Browse files Browse the repository at this point in the history
  • Loading branch information
akphi authored and jantimon committed Jan 20, 2021
1 parent c697725 commit 7e2b208
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ function hookIntoCompiler (compiler, options, plugin) {
function addFileToAssets (filename, compilation) {
filename = path.resolve(compilation.compiler.context, filename);
return fsReadFileAsync(filename)
.then(source => new webpack.sources.RawSource(source, true))
.then(source => new webpack.sources.RawSource(source, false))
.catch(() => Promise.reject(new Error('HtmlWebpackPlugin: could not load file ' + filename)))
.then(rawSource => {
const basename = path.basename(filename);
Expand Down

0 comments on commit 7e2b208

Please sign in to comment.