diff options
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 6daef243991..f7063442618 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('_'); }), |