diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-12-20 17:16:37 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-12-20 17:16:37 -0600 |
commit | 58b8b80787c47185bbca59bbb2039c2ba9022d27 (patch) | |
tree | 46c801d84e1cb4fef4175d67fc90c8d7e93b00ca /config | |
parent | 130b03c264b7a11a035a8dc2acd3c66279455704 (diff) | |
download | gitlab-ce-58b8b80787c47185bbca59bbb2039c2ba9022d27.tar.gz |
properly handle naming for dispatcher route chunks
Diffstat (limited to 'config')
-rw-r--r-- | config/webpack.config.js | 9 |
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('_'); }), |