Scenario that works:
-
I have an
APP_FRAMEWORK.JSfile that was generated through aWEBPACK, includingBOOTSTRAP AND JQUERYinside it.<script type="text/javascript" src="" defer></script> @if(!empty($assets['js'])) @foreach ($assets['js'] as $js) <script type="text/javascript" src=""></script> @endforeach @endif
If I load the page as in the example, it works perfectly, without any errors in the scripts that are loaded inside that loop below.
My question:
- Why, if I remove the "text/javascript" when loading the
MAIN SCRIPT (APP_FRAMEWORK.JS)the$ is not definederror starts to appear? - Remembering that this
TYPEis no longer mandatory, scripts are loaded in the correct order and there is aDEFER!!!


Aucun commentaire:
Enregistrer un commentaire