Skip to content
Snippets Groups Projects
Verified Commit 58b8b807 authored by Mike Greiling's avatar Mike Greiling
Browse files

properly handle naming for dispatcher route chunks

parent 130b03c2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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('_');
}),
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment