From a931ac10223bef3f13dc04c6efebf1dec4e76b7d Mon Sep 17 00:00:00 2001 From: ta264 Date: Mon, 9 Dec 2019 21:23:32 +0000 Subject: [PATCH] Fixed: Webpack worker loading with UrlBase --- frontend/gulp/webpack.js | 3 +-- frontend/src/index.js | 4 +--- frontend/src/preload.js | 2 ++ 3 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 frontend/src/preload.js diff --git a/frontend/gulp/webpack.js b/frontend/gulp/webpack.js index 8f3f40950..fb33a7afd 100644 --- a/frontend/gulp/webpack.js +++ b/frontend/gulp/webpack.js @@ -121,8 +121,7 @@ const config = { use: { loader: 'worker-loader', options: { - name: '[name].js', - inline: true + name: '[name].js' } } }, diff --git a/frontend/src/index.js b/frontend/src/index.js index e03b26dfa..015aeee0a 100644 --- a/frontend/src/index.js +++ b/frontend/src/index.js @@ -1,6 +1,4 @@ -/* eslint-disable-next-line no-undef */ -__webpack_public_path__ = `${window.Radarr.urlBase}/`; - +import './preload.js'; import React from 'react'; import { render } from 'react-dom'; import { createBrowserHistory } from 'history'; diff --git a/frontend/src/preload.js b/frontend/src/preload.js new file mode 100644 index 000000000..2b4902141 --- /dev/null +++ b/frontend/src/preload.js @@ -0,0 +1,2 @@ +/* eslint no-undef: 0 */ +__webpack_public_path__ = `${window.Radarr.urlBase}/`;