Вид с minified.js не отображается на странице razor

#javascript #asp.net #model-view-controller #razor #minifiedjs

Вопрос:

Я встроил уменьшенные файлы javascript и CSS в свой asp.net основное приложение MVC и пытается отобразить его в представлении razor. В node.js приложение, я создал index.html вызов уменьшенных js и CSS там работает нормально. Но это не работает с asp.net. Ниже приведен код.

 <div style="display: flex">
<div id="jsoneditor1"></div>
<div>
    <div style="float: left;"><button id="copy1">Copy ></button></div>
    <div style="float: left; clear: left;"><button id="copy2">Copy</button></div>
</div>
<div id="jsoneditor2" ></div>
 
     <link href="~/JSONEditor/jsoneditor.min.css" rel="stylesheet" type="text/css" />
    <script src="~/JSONEditor/jsoneditor.min.js"></script>





    <script>
        // create the editor
        const container1 = document.getElementById("jsoneditor1");

        const options1 = {
            mode: "tree",
            modes: ["code", "tree"], // allowed modes
            onError: function (err) {
                alert(err.toString());
            },
            onModeChange: function (newMode, oldMode) {
                console.log("Mode switched from", oldMode, "to", newMode);
            },
        };
        const editor1 = new JSONEditor(container1, options1);

        // set json
        const initialJson1 = {
            Array: [1, 2, 3, 4],
            Boolean: true,
            Null: null,
            Number: 123,
            Object: { a: "b", c: "d" },
            String: "Hello World",
        };
        editor1.set(initialJson1);

        // get json
        const updatedJson1 = editor1.get();

        //document.getElementById("getJSON").onclick = function () {
        // const json = editor1.get();
        // alert(JSON.stringify(json, null, 2));
        // };
    </script>





    <script>
        // create the editor
        const container2 = document.getElementById("jsoneditor2");

        const options2 = {
            mode: "tree",
            modes: ["code", "tree"], // allowed modes
            onError: function (err) {
                alert(err.toString());
            },
            onModeChange: function (newMode, oldMode) {
                console.log("Mode switched from", oldMode, "to", newMode);
            },
        };
        const editor2 = new JSONEditor(container2, options2);

        // set json
        const initialJson2 = {
            Array: [1, 2, 3, 4],
            Boolean: true,
            Null: null,
            Number: 123,
            Object: { a: "b", c: "d" },
            String: "Hello World",
        };
        editor2.set(initialJson2);

        // get json
        const updatedJson2 = editor2.get();
    </script>
 

Может кто-нибудь объяснить, в чем здесь проблема? Код, работающий с asp.net фреймворк MVC.