feat: build.assetsInlineLimit callback#15366
Conversation
|
|
|
Thanks for your work. I had the same idea of adding a callback to control inline of assets (#15343). However in my use case I need this for library mode. Would you mind to allow it for library mode as well? |
|
I don't have opinion on the lib mode, I will let other team members decide on this but my advice is to look at other libs for building libraires that will have more flexibility. |
|
LGTM 👍 Let's maybe wait for others to review or the next meeting to confirm if the priority order is fine. |
sapphi-red
left a comment
There was a problem hiding this comment.
LGTM with some tiny suggestions.
|
Is it still possible to inline a favicon in index.html after this change? By url- or base64-encoding the image file: <link rel="icon" type="image/svg+xml" href="<%= faviconEncoded %>" />This throws an error if the string is too long:
and prepends a
|
Fixes #2173
Supersedes and closes #8717
I've taken the party for the callback to override almost anything but lib mode. I've have really no strong opinion for what this callback should be able to override, for me the only need is to be able to inline images important for first paint and don't inline images at the bottom of the page.