Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3k stars 880 forks source link

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

Closed promatik closed 1 month ago

promatik commented 3 months ago

WHY

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

Fixes https://github.com/Laravel-Backpack/basset/issues/116 along with https://github.com/Laravel-Backpack/basset/pull/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 commented 1 month ago

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.