This repository was archived by the owner on Oct 27, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 51
Should cache-loader use module.exports.raw = true
to handle binary file ?
#68
Comments
/cc @mistic I think we can fix it 😄 |
@malash thanks for the report! Do you think you can provide a small example repo where I can reproduce the error and play with a solution? |
Thanks @mistic . I'v testes the There are 2 questions:
https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings |
Cool. Great work. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected Behavior
In this case. The
.png
is broken becausecache-loader
is not a raw loader. Which means thesource
is an UTF-8string
instead ofBuffer
. The binary data will be broken during conversion processed.Some loaders, e.g.
file-loader
, addedmodule.exports.raw = true
to solved this issue.Actual Behavior
.png
file broken.How Do We Reproduce?
cc: @jimexist
The text was updated successfully, but these errors were encountered: