Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-12-21 02:16:37 +0300
committerMike Greiling <mike@pixelcog.com>2017-12-21 02:16:37 +0300
commit58b8b80787c47185bbca59bbb2039c2ba9022d27 (patch)
tree46c801d84e1cb4fef4175d67fc90c8d7e93b00ca /config
parent130b03c264b7a11a035a8dc2acd3c66279455704 (diff)
properly handle naming for dispatcher route chunks
Diffstat (limited to 'config')
-rw-r--r--config/webpack.config.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 78ced4c3e8c..0cb69141a73 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -176,8 +176,13 @@ var config = {
return chunk.name;
}
return chunk.mapModules((m) => {
- var chunkPath = m.request.split('!').pop();
- 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('_');
}),