This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: add encoding & generator options #210
feat: add encoding & generator options #210
Changes from 7 commits
8a4832d
b577422
c94d8e8
6b827fa
18e6e9d
9ccc3a0
2bb2de6
a735888
79a88fe
f1649c0
218b623
1522c1c
21f8bf1
f287bfd
44374dc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add example with
mini-svg-data-uri
packageThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evilebottnawi I've added an example here: https://github.com/webpack-contrib/url-loader/pull/210/files/2bb2de67e75d175c1ab7b41a075307414f8b6930#diff-04c6e90faac2675aa89e2176d2eec7d8R259
this example to tell the people what is the final format of the final output to help them develop their own implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look here https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs
encoding
is optinal, sodata:text/html,%3Ch1%3EHello%2C%20World!%3C%2Fh1%3E
is valid, but in our case we always insert;
Rewrite it to "data:${mimetype || ''}${encoding?
;${encoding}
: ''},${src.toString(encoding)}`;" + testThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added
boolean
type for encoding, now we can disable it, if it's enabled it will use the defaultbase64
Large diffs are not rendered by default.
Large diffs are not rendered by default.