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
f65a1da0
Commit
f65a1da0
authored
May 01, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temporarily disable deterministic chunk hash logic
parent
50889179
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
44 deletions
+0
-44
config/webpack.config.js
config/webpack.config.js
+0
-44
No files found.
config/webpack.config.js
View file @
f65a1da0
const
crypto
=
require
(
'
crypto
'
);
const
fs
=
require
(
'
fs
'
);
const
path
=
require
(
'
path
'
);
const
glob
=
require
(
'
glob
'
);
...
...
@@ -193,49 +192,6 @@ const config = {
jQuery
:
'
jquery
'
,
}),
// assign deterministic module ids
new
webpack
.
NamedModulesPlugin
(),
new
NameAllModulesPlugin
(),
// assign deterministic chunk ids
new
webpack
.
NamedChunksPlugin
(
chunk
=>
{
if
(
chunk
.
name
)
{
return
chunk
.
name
;
}
const
moduleNames
=
[];
function
collectModuleNames
(
m
)
{
// handle ConcatenatedModule which does not have resource nor context set
if
(
m
.
modules
)
{
m
.
modules
.
forEach
(
collectModuleNames
);
return
;
}
const
pagesBase
=
path
.
join
(
ROOT_PATH
,
'
app/assets/javascripts/pages
'
);
if
(
m
.
resource
.
indexOf
(
pagesBase
)
===
0
)
{
moduleNames
.
push
(
path
.
relative
(
pagesBase
,
m
.
resource
)
.
replace
(
/
\/
index
\.[
a-z
]
+$/
,
''
)
.
replace
(
/
\/
/g
,
'
__
'
)
);
}
else
{
moduleNames
.
push
(
path
.
relative
(
m
.
context
,
m
.
resource
));
}
}
chunk
.
forEachModule
(
collectModuleNames
);
const
hash
=
crypto
.
createHash
(
'
sha256
'
)
.
update
(
moduleNames
.
join
(
'
_
'
))
.
digest
(
'
hex
'
);
return
`
${
moduleNames
[
0
]}
-
${
hash
.
substr
(
0
,
6
)}
`
;
}),
// copy pre-compiled vendor libraries verbatim
new
CopyWebpackPlugin
([
{
...
...
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