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

Ability to not load external dependencies #90

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

billmn
Copy link
Contributor

@billmn billmn commented Apr 7, 2022

This allows to avoid loading external dependencies.

In my case I need to use local javascript files which include Alpine v3 and other dependencies (eg dayjs, ...) compiled with Laravel Mix using the extract() method.

I then emptied the "scripts" configuration and included the javascript in the file resources/views/vendor/dashboard/dashboard.blade.php (manifest.js, vendor.js, ...).

Prior to this PR, clearing the "scripts" or "styles" configuration raises an exception like:
Spatie\Dashboard\Dashboard::script(): Argument #1 ($url) must be of type string, null given

@freekmurze freekmurze merged commit 5664c42 into spatie:main Apr 7, 2022
@freekmurze
Copy link
Member

Thanks!

@billmn billmn deleted the ignore-external-deps branch April 7, 2022 07:56
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.

2 participants