I have built a local plugin where i defined a js file.
I defined it according to the AMD syntax and it worked for some time, i have the source file in my plugins "amd/src" folder and a minified version (which i minified using an online tool) in the "amd/build" folder.
The plugin is active in every page on the site but for some reason in a random way, i sometimes see in the console a
"TypeError: define(...) is not a function" pointing to my define line in my javascript file.
This happens randomly when i refresh/clear cache/clear all moodle caches and i just don't understand why.
Could this be connected to the way i minified the file?
My moodle version is 3.2.1 and i am currently running with debug mode turned on.