summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Ho <ClemMakesApps@gmail.com>2017-12-21 09:46:09 -0600
committerClement Ho <ClemMakesApps@gmail.com>2017-12-21 09:46:09 -0600
commita57ee8dcf904bd81024ef51c5d0bfad37574fd3c (patch)
tree6a69bbe3fa647fa9b4b3dd26f902d05dce50cf5e
parent4e523c9fe5fd2c14bb0fad205b2e830dde430fac (diff)
downloadgitlab-ce-a57ee8dcf904bd81024ef51c5d0bfad37574fd3c.tar.gz
Update chunk configuration
-rw-r--r--config/webpack.config.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 89ac67799ae..f7063442618 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -175,15 +175,14 @@ var config = {
if (chunk.name) {
return chunk.name;
}
-
return chunk.mapModules((m) => {
- var chunkPath = m.request.split('!').pop();
- var splitPath = m.context.split('/pages');
- if(splitPath.length) {
- return path.relative(splitPath[0], chunkPath);
- } else {
- return path.relative(m.context, chunkPath);
+ const pagesBase = path.join(ROOT_PATH, 'app/assets/javascripts/pages');
+ 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('_');
}),