Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(assets): ensure ?no-inline is not included in the asset url in the production environment #19496

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OnlyWick
Copy link
Contributor

@OnlyWick OnlyWick commented Feb 23, 2025

Description

close #19490.

It would be better not to retain ?no-inline in the production environment, while keeping it unchanged in the development environment.

@sapphi-red sapphi-red added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Feb 25, 2025
@OnlyWick OnlyWick force-pushed the feat-no-inline-vite branch from 75a9e7d to dea9917 Compare February 25, 2025 05:48
sapphi-red

This comment was marked as outdated.

@sapphi-red sapphi-red dismissed their stale review February 25, 2025 05:59

noticed a bug

@OnlyWick OnlyWick force-pushed the feat-no-inline-vite branch from dea9917 to 133bdc4 Compare February 25, 2025 07:00
@sapphi-red
Copy link
Member

while keeping it unchanged in the development environment.

What is the reason of this? For me, removing ?no-inline is feels expected as ?no-inline is just a special marker.

@OnlyWick
Copy link
Contributor Author

In the development environment, the purpose of not deleting it is so that users can see if it has been added with a ?no-inline marker, which I think would be better.

@sapphi-red
Copy link
Member

Doesn't that apply to the prod env as well? (I'm trying to understand the tradeoffs here)

@OnlyWick
Copy link
Contributor Author

OnlyWick commented Feb 27, 2025

My goal is to distinguish which ones I manually added the ?no-inline marker to in the dev env. When the asset file > assetsInlineLimit, it will be directly imported using the URL. And the asset file < assetsInlineLimit will be directly converted to base64, so I add a ?no-inline to it, it will also use the URL to import. Now if we remove the ?no-inline marker, these asset files > or < assetsInlineLimit can't see any difference in the URL(If we do not view the corresponding source code during development, but view the HTML in the browser, we will not know whether the ?no-inline marker is added or not.).

For prod env, I believe that building will not go wrong, ?no-inline is a development marker, it is not necessary to appear in the bundle, and ?no-inline will also take up a few network transmission bytes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

?no-inline is included in asset url
2 participants