jQuery v3.5.1
standard build works, the slim build does not, what are the missing dependencies for Draggable
to work with the jQuery slim build?
Reproduction code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Work -->
<!-- <script src="https://code.jquery.com/jquery-3.5.1.js"></script> -->
<!-- Does not work -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
</head>
<body>
<span id="draggable">Drag me around</span>
<script>
$('#draggable').draggable()
</script>
</body>
</html>
Error in console:
I've tried the following imports to include potential dependencies, but didn't succeed:
import $ from 'jquery/dist/jquery.slim.js'
import 'jquery/src/manipulation/_evalUrl.js'
import 'jquery/src/deprecated/ajax-event-alias.js'
import 'jquery/src/effects.js'
import 'jquery/src/effects/Tween.js'
import 'jquery/src/effects/animatedSelector.js'
import 'jquery-ui/ui/widgets/draggable.js'
And surprisingly, the minified jQuery didn't work either:
import $ from 'jquery/dist/jquery.min.js'
import 'jquery-ui/ui/widgets/draggable.js'
Only the normal build worked:
import $ from 'jquery/dist/jquery.js'
import 'jquery-ui/ui/widgets/draggable.js'