You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How do I use a 3rd party lib required by a script tag in the html file? #1171
I've given up with imports/requires, so I am trying the script-tag way.
in src/index.html:
{{#unless environment.production}}
<!-- These two files (used for testing) cannot be included the 'normal' way, because angular-cli's build tools don't resolve dependencies of 3rd party libs. --><scriptsrc="/dist/vendor/sinon/pkg/sinon.js" type="text/javascript"></script><scriptsrc="/dist/vendor/axios/dist/axios.js" type="text/javascript"></script>
{{/unless}}
</head>
Closed as issue was made obsolete by #1455. You shouldn't have the issue that originally led to this approach, as webpack handles the dependencies of dependencies as you would expect it to.
Activity
RicardoVaranda commentedon Jun 23, 2016
The way you are calling the scripts is wrong:
<script src="/dist/vendor/axios/dist/axios.js" type="text/javascript"></script>Should be:
<script src="vendor/axios/dist/axios.js" type="text/javascript"></script>If you open the Developer tools in Google Chrome go to Console unselect Hide network messages and you should see the 404
Hope you see the difference :)
NullVoxPopuli commentedon Jun 23, 2016
I changed the script tags in my index.html file to:
my chrome has never given me 404s with this issue:

In the network pane, I don't even see a call to sinon.js
NullVoxPopuli commentedon Jun 23, 2016
the same thing happens with jQuery, so it's non sinon specific
filipesilva commentedon Jul 28, 2016
Closed as issue was made obsolete by #1455. You shouldn't have the issue that originally led to this approach, as webpack handles the dependencies of dependencies as you would expect it to.
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.