$(…).DataTable is not a function when using Laravel Mix
$(…).DataTable is not a function when using Laravel Mix I struggle using Laravel Mix and DataTables. The issue I have is that when I compile down my .js-files etc., each time I would then visit a page that would execute a jQuery datatable, the follwoing error is thrown: The error is: jQuery.Deferred exception: $(...).DataTable is not a function TypeError: $(...).DataTable is not a function Uncaught TypeError: $(...).DataTable is not a function From what I understand, $(...).DataTable is not a global variable, but how can I make sure that it is accessible "on a global scope" / within my app? $(...).DataTable The following is my setup: app.js import jquery from 'jquery/dist/jquery.slim' import 'bootstrap-sass' import 'datatables.net'; import dt from 'datatables.net-bs'; window.$ = window.jQuery = jquery; webpack.mix.js mix .js('resources/assets/admin/js/app.js', 'js/') .extract([ 'jquery', 'bootstrap-s...
