Sfoglia il codice sorgente

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 10 anni fa
parent
commit
9b11fe3812
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  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) {