diff --git a/kolibri/core/assets/src/index.js b/kolibri/core/assets/src/index.js index 535b70c71b1..b4819ae111c 100644 --- a/kolibri/core/assets/src/index.js +++ b/kolibri/core/assets/src/index.js @@ -14,18 +14,6 @@ import coreModule from './state/modules/core'; // Do this before any async imports to ensure that public paths // are set correctly urls.setUp(); -if (process.env.NODE_ENV === 'production') { - /* eslint-disable no-undef */ - __webpack_public_path__ = urls.static(`${__kolibriModuleName}/`); - /* eslint-enable */ -} - -// Shim window.location.origin for IE. -if (!window.location.origin) { - window.location.origin = `${window.location.protocol}//${window.location.hostname}${ - window.location.port ? `:${window.location.port}` : '' - }`; -} // set up logging logging.setDefaultLevel(process.env.NODE_ENV === 'production' ? 2 : 0); diff --git a/packages/kolibri-module/src/index.js b/packages/kolibri-module/src/index.js index 7408be3a621..58e40eff8fe 100644 --- a/packages/kolibri-module/src/index.js +++ b/packages/kolibri-module/src/index.js @@ -5,13 +5,6 @@ */ import coreApp from 'kolibri'; -import urls from 'kolibri/urls'; - -if (process.env.NODE_ENV === 'production') { - /* eslint-disable no-undef */ - __webpack_public_path__ = urls.static(`${__kolibriModuleName}/`); - /* eslint-enable */ -} export default class KolibriModule { /** diff --git a/packages/kolibri-tools/lib/webpack.config.plugin.js b/packages/kolibri-tools/lib/webpack.config.plugin.js index 2ecfd7a74b2..3bb48174861 100644 --- a/packages/kolibri-tools/lib/webpack.config.plugin.js +++ b/packages/kolibri-tools/lib/webpack.config.plugin.js @@ -117,7 +117,8 @@ module.exports = ( // webpack properly handles that or not. chunkLoadingGlobal: 'webpackChunkwebpack__' + data.name.replace('.', ''), scriptType: 'text/javascript', - pathinfo: mode === 'production', + pathinfo: false, + publicPath: 'auto', }, resolve: { alias,