Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
ec654bc4
Commit
ec654bc4
authored
Apr 30, 2019
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix webpack asset patch with '/' as relative root
https://gitlab.com/gitlab-org/gitlab-ce/issues/60932
parent
2432a540
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
app/assets/javascripts/lib/utils/webpack.js
app/assets/javascripts/lib/utils/webpack.js
+3
-1
changelogs/unreleased/fix-webpack-assets-relative-url-bug.yml
...gelogs/unreleased/fix-webpack-assets-relative-url-bug.yml
+5
-0
No files found.
app/assets/javascripts/lib/utils/webpack.js
View file @
ec654bc4
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
...
...
changelogs/unreleased/fix-webpack-assets-relative-url-bug.yml
0 → 100644
View file @
ec654bc4
---
title
:
Fix webpack assets handling when relative url root is '/'
merge_request
:
27909
author
:
type
:
fixed
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment