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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b3734ec8
Commit
b3734ec8
authored
May 03, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent duplicate chunks from being loaded in webpack_helper
parent
9328c75e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
app/helpers/webpack_helper.rb
app/helpers/webpack_helper.rb
+9
-2
No files found.
app/helpers/webpack_helper.rb
View file @
b3734ec8
...
...
@@ -33,7 +33,7 @@ module WebpackHelper
javascript_include_tag
(
*
chunks
)
end
def
entrypoint_paths
(
source
,
extension:
nil
)
def
entrypoint_paths
(
source
,
extension:
nil
,
exclude_duplicates:
true
)
return
""
unless
source
.
present?
paths
=
Gitlab
::
Webpack
::
Manifest
.
entrypoint_paths
(
source
)
...
...
@@ -46,8 +46,15 @@ module WebpackHelper
paths
.
map!
{
|
p
|
"
#{
force_host
}#{
p
}
"
}
end
if
exclude_duplicates
@used_paths
||=
[]
new_paths
=
paths
-
@used_paths
@used_paths
+=
new_paths
new_paths
else
paths
end
end
def
webpack_public_host
if
Rails
.
env
.
test?
&&
Rails
.
configuration
.
webpack
.
dev_server
.
enabled
...
...
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