Commit b4ede512 authored by Phil Hughes's avatar Phil Hughes

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
parents 43fcb897 ec654bc4
Pipeline #59259425 failed with stages
in 43 minutes and 18 seconds
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:
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
title: Fix webpack assets handling when relative url root is '/'
merge_request: 27909
type: fixed
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment