From e36fdb54aede63f8de4eecee672d1b88798ee107 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Oct 06 2017 16:31:05 +0000 Subject: Inform the JS UI of the public build path --- diff --git a/hubs/static/client/app/index.js b/hubs/static/client/app/index.js index f1c3824..cccae63 100644 --- a/hubs/static/client/app/index.js +++ b/hubs/static/client/app/index.js @@ -1,3 +1,7 @@ +// Read the public path from the backend +// https://webpack.js.org/guides/public-path/ +__webpack_public_path__ = window.resourceBaseUrl; + import React from 'react'; import ReactDOM from 'react-dom'; import getStore from "./core/store"; diff --git a/hubs/static/client/webpack.common.js b/hubs/static/client/webpack.common.js index cdf4140..1f8308f 100644 --- a/hubs/static/client/webpack.common.js +++ b/hubs/static/client/webpack.common.js @@ -18,7 +18,6 @@ module.exports = { path: PATHS.build, filename: '[name].js', chunkFilename: '[name].[chunkhash:8].bundle.js', - publicPath: "/static/js/build/", // TODO: https://webpack.js.org/guides/public-path/ library: 'Hubs', }, externals: { diff --git a/hubs/templates/master.html b/hubs/templates/master.html index a0f8b8c..cbdab08 100644 --- a/hubs/templates/master.html +++ b/hubs/templates/master.html @@ -166,6 +166,10 @@ + {% endblock %}