summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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('_');
}),