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

Admin Theme add min asset back #17530

Closed
wants to merge 2 commits into from
Closed

Admin Theme add min asset back #17530

wants to merge 2 commits into from

Conversation

Skrypt
Copy link
Contributor

@Skrypt Skrypt commented Feb 25, 2025

Here is an example on how this could be done.
Though, I'd rather have .map files because serving unminified assets on prod is unecessary. Also, if you want to debug your assets you don't want to serve all unminified assets at the same time on dev. With the new Asset Manager tool you want to simply do yarn watch -n asset-name so that this asset gets recompiled in "development" mode as unminified/unoptimized. Else, if you want to debug on your Production server then, you should have a .map file instead of serving every assets as unminified/unoptimized.

Here, the only risky thing that could happen is that the file did not get compiled yet in the wwwroot folder. You need at least to set the "min" action after the "parcel" action in your Assets.json file to start minifying this file. I don't want to start a second Parcel process to do this, this is why I created the "min" action. Though, it adds unecessary compilation time that should rather be spent on making the .map files story work.

Here is an example on how this could be done.
Though, I'd rather have .map files because serving unminified assets on prod is unecessary.
Also, if you want to debug your assets you don't want to serve all unminified assets at the same time on dev.
With the new Asset Manager tool you want to simply do `yarn watch -n asset-name` so that this asset gets recompiled in "development" mode as unminified/unoptimized. Else, if you want to debug on your Production server then, you should have a .map file instead of serving every assets as unminified/unoptimized.

Here, the only risky thing that could happen is that the file did not get compiled yet in the wwwroot folder. You need at least to set the "min" action after the "parcel" action in your Assets.json file to start minifying this file. I don't want to start a second Parcel process to do this, this is why I created the "min" action. Though, it adds unecessary compilation time that should rather be spent on making the .map files story work.
@Skrypt Skrypt closed this Feb 25, 2025
@Skrypt
Copy link
Contributor Author

Skrypt commented Feb 25, 2025

Nevermind this won't work. It creates already a min asset file.

@Skrypt Skrypt deleted the skrypt/wwwroot-min branch February 25, 2025 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant