Closed canadaduane closed 4 years ago
you can specify encoding
which you want, like utf8
, utf16le
, latin1
, base64
, hex
, ascii
, binary
, ucs2
.
{
"plugins": [
["snowpack-plugin-inliner", {
"encoding": "hex"
}],
],
}
but maybe not work in browser without use base64
to encode for data-urls
Yeah, I don't think that would work in a browser. Thanks for clarifying though.
The default encoding option is set to
base64
. I'm curious if any other node-supportedbuffer.toString
encodings are useful in this plugin?For example,
hex
,latin1
, orascii
don't seem to be reasonable options to me.https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
Maybe I'm missing some use cases?