Closed IgorWolbers closed 7 years ago
The issue was the order of the script
tags in the html
file as pointed out in the answer by Lious on the SO thread. Changing it to this fixed the problem, which loads the systemjs config file first before loading the dependencies and the application.
<script src="/Scripts/dist-system-config.js"></script>
<script src="/bundles/dependencies.bundle.js"></script>
<script src="/bundles/app.bundle.js"></script>
I am trying to get my angular application to the point where it is ready for distribution and I have managed to create 2 bundles, one for my angular application and one for my dependencies (which include the angular framework and the rxjs framework). Both bundles are produced and my custom bundle (which contains my code) is loaded by the front end but the vendor/dependency bundle is ignored and the dependencies are still loaded from the
node_modules
folder.My solution is based mostly on this previous answer on Stack Overflow with a couple of exceptions like not including/inlining my html templates and adding
node_modules
to the exclusion path of the dependencies.I will include everything I believe is relevant to the problem, if more is needed please let me know. I'm thinking that it is an issue with my
dist-system-config.js
file that I use in the final distribution, I am sure there is something I just do not fully understand.I have also created a question on Stack Overflow. Any pointers would be very much appreciated.
What I have observed:
app.bundle.js
is 12KB in size. The filedependencies.bundle.js
is 773KB in size.node_modules
folder. primary issueIndex.html
app/boot.ts
Scripts/dist-system-config.js
gulpfile.js
package.json (Relevant versions only)