Forráskód Böngészése

Fix runtime webpack public url (#3442)

* Fix runtime webpack public url

* linting
Steven Silvester 7 éve
szülő
commit
5a220cd2f3

+ 3 - 0
dev_mode/index.js

@@ -6,7 +6,10 @@
 require('es6-promise/auto');  // polyfill Promise on IE
 
 var PageConfig = require('@jupyterlab/coreutils').PageConfig;
+// eslint-disable-next-line
+__webpack_public_path__ = PageConfig.getOption('publicUrl');
 
+// This needs to come after __webpack_public_path__ is set.
 require('font-awesome/css/font-awesome.min.css');
 
 /**

+ 1 - 2
dev_mode/templates/partial.html

@@ -3,8 +3,7 @@
     "{{ key }}": "{{ value }}",
     {% endfor -%}
     "baseUrl": "{{ base_url }}",
-    "wsUrl": "{{ ws_url }}",
-    "publicUrl": "{{ public_url }}"
+    "wsUrl": "{{ ws_url }}"
   }</script>
 
   {% block favicon %}<link rel="shortcut icon" type="image/x-icon" href="{{ base_url }}static/base/images/favicon.ico">{% endblock %}

+ 3 - 0
jupyterlab/staging/index.js

@@ -6,7 +6,10 @@
 require('es6-promise/auto');  // polyfill Promise on IE
 
 var PageConfig = require('@jupyterlab/coreutils').PageConfig;
+// eslint-disable-next-line
+__webpack_public_path__ = PageConfig.getOption('publicUrl');
 
+// This needs to come after __webpack_public_path__ is set.
 require('font-awesome/css/font-awesome.min.css');
 
 /**

+ 1 - 2
jupyterlab/staging/templates/partial.html

@@ -3,8 +3,7 @@
     "{{ key }}": "{{ value }}",
     {% endfor -%}
     "baseUrl": "{{ base_url }}",
-    "wsUrl": "{{ ws_url }}",
-    "publicUrl": "{{ public_url }}"
+    "wsUrl": "{{ ws_url }}"
   }</script>
 
   {% block favicon %}<link rel="shortcut icon" type="image/x-icon" href="{{ base_url }}static/base/images/favicon.ico">{% endblock %}