renatomarinho / laravel-page-speed

Package to optimize your site automatically which results in a 35%+ optimization
MIT License
2.4k stars 275 forks source link

DeferJavascript causes "Uncaught ReferenceError: GLightbox is not defined" #173

Open Mor9oth opened 1 year ago

Mor9oth commented 1 year ago

As soon as I use the middleware "\RenatoMarinho\LaravelPageSpeed\Middleware\DeferJavascript::class," I got this error: "Uncaught ReferenceError: GLightbox is not defined" As soon as I remove it, the error also is gone.

<script type=text/javascript> const lightbox = GLightbox({ touchNavigation: true, loop: false, closeEffect: 'fade' });

How can I fix that?

memiljamel commented 1 year ago

same issue.