的東西:我要創建我的角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需要正確處理這些包?