The what: I want to create a bundled version of my Angular 2 application
The how: Using Gulp and maven. Gulp for html, js and css files, and Maven for a war file. I have followed this tutorial to setup a gulp friendly structure using yo: https://www.npmjs.com/package/generator-angular2-typescript
I am following this solution here: https://stackoverflow.com/a/39561478/5655414 . I can successfully bundle my application and create a war from my entire project. When I run gulp build, my index.html goes from this:
<menu>Loading buttons....</menu>
<app>Loading interface..</app>
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err) { console.error(err); });
</script>
to this:
<menu>Loading buttons....</menu>
<app>Loading interface..</app>
<!-- inject:js -->
<script src="vendors.min.js"></script>
<script src="app.min.js"></script>
<!-- endinject -->
When I create the war file, which contains:
app.min.js && -||-.map
config.json (my config file that bootstraps the application)
index.html (the the updated script sources)
styles.min.css
vendors.min.js && -||-.map
and deploy it to jboss, the following GET requests fail:
GET http://localhost:8080/styles.min.css
GET http://localhost:8080/vendors.min.js
GET http://localhost:8080/app.min.js
this makes no sense to me, as the needed js files are clearly within the war file.
Are there additional things that my index.html needs in order to process these bundles correctly?