$ is not defined with Angular build
$ is not defined with Angular build

I used the documentation https://l-lin.github.io/angular-datatables/#/getting-started to implement the datatable in my angular 8 application. It works fine during development but stops working when I create a production build giving the error $ is not defined. I have been looking over the internet for a solution but nothing worked. Please help me with this.
This discussion has been closed.
Answers
You would get that if you're not including the jQuery source file.
Colin
Also, If this was the case, then it should not work during development either.
@colin I am including jquery file. Let me post my angular.json scripts
"scripts": [
"node_modules/popper.js/dist/umd/popper.js",
"node_modules/tooltip.js/dist/umd/tooltip.min.js",
"node_modules/perfect-scrollbar/dist/perfect-scrollbar.js",
"node_modules/jquery/dist/jquery.js",
"node_modules/datatables.net/js/jquery.dataTables.js",
"node_modules/jszip/dist/jszip.js",
"node_modules/datatables.net-buttons/js/dataTables.buttons.js",
"node_modules/datatables.net-buttons/js/buttons.colVis.js",
"node_modules/datatables.net-buttons/js/buttons.flash.js",
"node_modules/datatables.net-buttons/js/buttons.html5.js",
"node_modules/datatables.net-buttons/js/buttons.print.js"
],
Wonder if this SO thread might help or this?
Kevin