I followed the very useful discussion in this question and dataTables is working well . This is how I have setup the file where dataTables is imported:
import jquery from "jquery" window.jQuery = jquery window.$ = jquery import DataTable from "datatables.net-bs5" import Buttons from 'datatables.net-buttons-bs5' import 'jszip' import 'pdfmake' window.DataTable = DataTable(); Buttons();
However, I still cannot get the datatables.net-buttons-bs5 plugin to work. It seems like I must have something wrong with the syntax because although dataTables itself recognizes that jQuery is available, for some reason Buttons does not and the browser reports these errors:
Uncaught ReferenceError: jQuery is not defined at dataTables.buttons.min.js:5:283 at dataTables.buttons.min.js:5:308 Uncaught ReferenceError: jQuery is not defined at buttons.bootstrap5.min.js:5:379 at buttons.bootstrap5.min.js:5:404
Any suggestions would be so very, very greatly appreciated.