Fix jQuery dependency for Toastr library

Import jQuery and make it globally available before Toastr is loaded.
This prevents console errors about jQuery not being found.
This commit is contained in:
Younes ENNAJI
2026-01-25 06:03:39 +01:00
parent 0fe2e3e38e
commit 06f75b21eb
6 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"dist/main.css": "/dist/main.2ef7930f.css",
"dist/main.js": "/dist/main.3b34e6a6.js",
"dist/main.js": "/dist/main.943ce8e8.js",
"dist/455.3a7b4474.css": "/dist/455.3a7b4474.css",
"dist/455.095e6545.js": "/dist/455.095e6545.js",
"dist/411.29cd993e.css": "/dist/411.29cd993e.css",
@@ -1,8 +1,13 @@
import { Controller } from '@hotwired/stimulus'
import { showNotificationsForHandler } from '../show_notifications'
import jQuery from 'jquery'
import 'toastr/build/toastr.min.css'
// Make jQuery available globally for toastr
window.jQuery = jQuery
window.$ = jQuery
export default class extends Controller {
connect() {
showNotificationsForHandler('toastr')
+1 -1
View File
@@ -5,7 +5,7 @@
"/dist/main.2ef7930f.css"
],
"js": [
"/dist/main.3b34e6a6.js"
"/dist/main.943ce8e8.js"
]
}
}
-2
View File
File diff suppressed because one or more lines are too long
+2
View File
File diff suppressed because one or more lines are too long