Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-05-01 12:42:00 +0300
committerPhil Hughes <me@iamphill.com>2019-05-01 12:42:00 +0300
commitb4ede51274c31bd9dbc5a8e285b0544bfb32906d (patch)
tree0d7c4c664f898036a581fd895c6f1614862ced57 /app
parent43fcb8971c590a0a0b941b60d33d4e7fca77221c (diff)
parentec654bc41ac21ba895ae3a56718db63b49db4051 (diff)
Merge branch 'fix-webpack-assets-relative-url-bug' into 'master'
Fix webpack asset patch with '/' as relative root See merge request gitlab-org/gitlab-ce!27909
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/lib/utils/webpack.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/utils/webpack.js b/app/assets/javascripts/lib/utils/webpack.js
index 37b5409a51d..37b17f0fe23 100644
--- a/app/assets/javascripts/lib/utils/webpack.js
+++ b/app/assets/javascripts/lib/utils/webpack.js
@@ -1,3 +1,5 @@
+import { joinPaths } from '~/lib/utils/url_utility';
+
// tell webpack to load assets from origin so that web workers don't break
// eslint-disable-next-line import/prefer-default-export
export function resetServiceWorkersPublicPath() {
@@ -5,7 +7,7 @@ export function resetServiceWorkersPublicPath() {
// the webpack publicPath setting at runtime.
// see: https://webpack.js.org/guides/public-path/
const relativeRootPath = (gon && gon.relative_url_root) || '';
- const webpackAssetPath = `${relativeRootPath}/assets/webpack/`;
+ const webpackAssetPath = joinPaths(relativeRootPath, '/assets/webpack/');
__webpack_public_path__ = webpackAssetPath; // eslint-disable-line camelcase
// monaco-editor-webpack-plugin currently (incorrectly) references the