BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
b8d79cc4
Commit
b8d79cc4
authored
Dec 21, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-webpack-chunk-naming' into 'master'
Properly name webpack chunks for dynamic imports See merge request gitlab-org/gitlab-ce!16066
parents
92e15071
c46f7b2a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
dispatcher.js
app/assets/javascripts/dispatcher.js
+3
-1
index.js
app/assets/javascripts/pages/users/show/index.js
+3
-0
webpack.config.js
config/webpack.config.js
+7
-2
No files found.
app/assets/javascripts/dispatcher.js
View file @
b8d79cc4
...
@@ -110,6 +110,8 @@ import Activities from './activities';
...
@@ -110,6 +110,8 @@ import Activities from './activities';
return
false
;
return
false
;
}
}
const
fail
=
()
=>
Flash
(
'Error loading dynamic module'
);
path
=
page
.
split
(
':'
);
path
=
page
.
split
(
':'
);
shortcut_handler
=
null
;
shortcut_handler
=
null
;
...
@@ -540,7 +542,7 @@ import Activities from './activities';
...
@@ -540,7 +542,7 @@ import Activities from './activities';
new
CILintEditor
();
new
CILintEditor
();
break
;
break
;
case
'users:show'
:
case
'users:show'
:
new
UserCallout
(
);
import
(
'./pages/users/show'
).
then
(
m
=>
m
.
default
()).
catch
(
fail
);
break
;
break
;
case
'admin:conversational_development_index:show'
:
case
'admin:conversational_development_index:show'
:
new
UserCallout
();
new
UserCallout
();
...
...
app/assets/javascripts/pages/users/show/index.js
0 → 100644
View file @
b8d79cc4
import
UserCallout
from
'~/user_callout'
;
export
default
()
=>
new
UserCallout
();
config/webpack.config.js
View file @
b8d79cc4
...
@@ -176,8 +176,13 @@ var config = {
...
@@ -176,8 +176,13 @@ var config = {
return
chunk
.
name
;
return
chunk
.
name
;
}
}
return
chunk
.
mapModules
((
m
)
=>
{
return
chunk
.
mapModules
((
m
)
=>
{
var
chunkPath
=
m
.
request
.
split
(
'!'
).
pop
();
const
pagesBase
=
path
.
join
(
ROOT_PATH
,
'app/assets/javascripts/pages'
);
return
path
.
relative
(
m
.
context
,
chunkPath
);
if
(
m
.
resource
.
indexOf
(
pagesBase
)
===
0
)
{
return
path
.
relative
(
pagesBase
,
m
.
resource
)
.
replace
(
/
\/
index
\.[
a-z
]
+$/
,
''
)
.
replace
(
/
\/
/g
,
'__'
);
}
return
path
.
relative
(
m
.
context
,
m
.
resource
);
}).
join
(
'_'
);
}).
join
(
'_'
);
}),
}),
...
...
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