Skip to content

Commit a01b143

Browse files
Explvclaude
andcommitted
Fix Bootstrap jQuery dependency error
Reorder imports in main.js to ensure jQuery is globally available before Bootstrap is imported, resolving "Bootstrap's JavaScript requires jQuery" error. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 25fb3c5 commit a01b143

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,17 @@ import 'sweetalert2/dist/sweetalert2.min.css';
77

88
// Import JS dependencies
99
import $ from 'jquery';
10-
import 'bootstrap/dist/js/bootstrap.min.js';
11-
import 'jquery-ui/ui/core.js';
12-
import 'jquery-ui/ui/widget.js';
13-
import 'jquery-ui/ui/widgets/selectmenu.js';
1410
import L from 'leaflet';
1511
import Swal from 'sweetalert2';
1612

1713
// Make jQuery available globally (for existing code compatibility)
1814
window.$ = window.jQuery = $;
15+
16+
// Import Bootstrap and jQuery UI after jQuery is globally available
17+
import 'bootstrap/dist/js/bootstrap.min.js';
18+
import 'jquery-ui/ui/core.js';
19+
import 'jquery-ui/ui/widget.js';
20+
import 'jquery-ui/ui/widgets/selectmenu.js';
1921
window.L = L;
2022
window.Swal = Swal;
2123

0 commit comments

Comments
 (0)