Even if there are a lot threads that talk about this particular problem, non of them solved the issue I am seeing.
I have an existing Angular 4 application in which I am loading Javascript files as follows within the index.html:
<script src="assets/js/libs/three.js.r86/three.js"></script>
<script src="assets/js/libs/three.js.r86/controls/OrbitControls.js"></script>
<script src="assets/js/TrackballControls.js"></script>
...
Some of those JS files are having the following statement:
module.exports = DetectionPoint;
When loading the application I am consistently getting the following error:
ReferenceError: module is not defined
Based on my reading It seems related to a very basic problem in loading commonJS(not 100% sure)
Is there something to add in the package.json for having the CommonJS loaded?
Is this related to the fact that i am loading those JS in the index.html?
P.S: I already went over the following threads with no luck:
Load Angular.JS - This one is interesting but I could not load the angular.js file, not sure if I should download it first from somewhere
Thx