0

Durandal 2.0 が出たとき、私は Hottowel プロジェクトに取り組んでいたので、当然アップグレードしました。ファイル構造がめちゃくちゃになり、フォルダーをフォルダーに移動require.jsしたり、durandalフォルダーをScriptsフォルダーに移動したりしました。元のHottowelテンプレートのように、フォルダーdurandalをフォルダーに戻し、.Apprequire.jsScriptsindex.cshtml

しかし、突然、ページの読み込み時に次のエラーが発生します。

GET http://localhost:7153/App/jquery.js 404 (Not Found) require.js:1880
GET http://localhost:7153/App/plugins/history.js 404 (Not Found) require.js:1880
GET http://localhost:7153/App/knockout.js 404 (Not Found) require.js:1880

require をロードして durandal を開始する前に、jQuery とバンドルされたノックアウト (ASP.NET バンドルを使用) をロードしています。

@Scripts.Render("~/scripts/vendor")
    @if(HttpContext.Current.IsDebuggingEnabled) {
        <script type="text/javascript" src="~/Scripts/require.js" data-main="@Url.Content("~/App/main.js")"></script>
    } else {
        <script type="text/javascript" src="~/App/main-built.js"></script>
    }

それを修正する方法はありますか?Durandal 1.2 に戻らなければならないのは嫌です。

4

1 に答える 1