Przeglądaj źródła

Changing index.html to show how to load from subdir.

That is, showing there should be script tag with preset baseUrl
pointing to project root dir before loading anything else.
Herbert Vojčík 9 lat temu
rodzic
commit
9b11fe3812
1 zmienionych plików z 5 dodań i 2 usunięć
  1. 5 2
      internal/index.html

+ 5 - 2
internal/index.html

@@ -5,13 +5,16 @@
     <title>Amber Smalltalk</title>
     <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
     <meta name="author" content="Nicolas Petton"/>
-    <script type='text/javascript' src='../config.js'></script>
+    <script>
+        var require = {baseUrl: ".."};
+    </script>
     <script type='text/javascript' src='../node_modules/requirejs/require.js'></script>
+    <script type='text/javascript' src='../config.js'></script>
 </head>
 
 <body>
 <script type='text/javascript'>
-    require.config({baseUrl: '..'});
+//    require.config({baseUrl: '..'});
     require(
         ["amber/devel", "helios/all", "amber_cli/AmberCli"],
         function (amber) {