簡體   English   中英

C#MVC捆綁不使用Angular Elements Web Component

[英]C# MVC bundling not working with Angular Elements Web Component

我在C#MVC項目中使用Angular Elements。

當我在main.cshtml直接包含angular元素構建文件時,如<script type="text/javascript" src="~/Script/Angular/artifi-graphics.js"></script>它的工作正常。

當我嘗試在捆綁包中添加構建文件時

bundles.Add(new ScriptBundle("~/bundles/Layout_8_CommonModule")
                .Include("~/Script/Angular/artifigraphics.js")

然后項目沒有加載。

在控制台網絡中,請求處於待處理狀態,一段時間后它將失敗。 在此輸入圖像描述

經過大量搜索后發現C#bundling並不是那么聰明,可以捆綁角度生成構建文件,這些文件也由node concat庫合並。

所以我就像添加腳本一樣將angular bundle添加到main.cshtml文件中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM