的东西:我要创建我的角2应用捆绑Angular2生产:GULP
该如何捆绑版本:使用咕嘟咕嘟和Maven。 gulp为html,js和css文件,Maven为war文件。我按照这个教程设置了使用哟的吞咽友好结构:https://www.npmjs.com/package/generator-angular2-typescript
我在这里遵循这个解决方案:https://stackoverflow.com/a/39561478/5655414。我可以成功捆绑我的应用程序,并从我的整个项目中创建一场战争。当我运行一饮而尽的身材,我的index.html云从这个:
<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>
这样:
<menu>Loading buttons....</menu>
<app>Loading interface..</app>
<!-- inject:js -->
<script src="vendors.min.js"></script>
<script src="app.min.js"></script>
<!-- endinject -->
当我创建war文件,其中包含:
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
和部署它给jboss,下面的GET请求失败:
GET http://localhost:8080/styles.min.css
GET http://localhost:8080/vendors.min.js
GET http://localhost:8080/app.min.js
这对我来说没有任何意义,因为所需的js文件显然在战争文件中。
有没有额外的东西,我的index.html需要正确处理这些包?