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

Set/Force the extension to JS/CSS on scripts and styles #5489

Merged
merged 2 commits into from
Jun 4, 2024

Conversation

promatik
Copy link
Member

@promatik promatik commented Apr 7, 2024

WHY

BEFORE - What was wrong? What was happening before this PR?

Fixes Laravel-Backpack/basset#116 along with Laravel-Backpack/basset#117.

This will force the loaded scripts to be js type, and styles to be css type.

This way scripts like tailwind: https://cdn.tailwindcss.com/3.4.3 which has no extension, can be rendered as a script.

Test:

image

Is it a breaking change?

No, it will work with older code/version of Basset.

How can we test the before & after?

Load the https://cdn.tailwindcss.com/3.4.3 script on scripts.blade.php.

@tabacitu
Copy link
Member

tabacitu commented Jun 4, 2024

I agree it's a good change, and that it's a BC since it's only happening on the array of files that we have in the config, which is already split by type js/css. So this looks like an easy win. Why hasn't this been merged yet?!

@pxpm if you have any concerns feel free to revert.

@tabacitu tabacitu merged commit d0cc722 into main Jun 4, 2024
9 checks passed
@tabacitu tabacitu deleted the set-extension-scripts-styles branch June 4, 2024 05:38
@pxpm pxpm restored the set-extension-scripts-styles branch June 4, 2024 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG] How to add Tailwind css globally with basset?
3 participants