Skip to content

Commit a3d3b12

Browse files
committed
fix: chunk names now should no more exceed max file path length
1 parent b70ef25 commit a3d3b12

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/gatsby/src/utils/js-chunk-names.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ function replaceUnifiedRoutesKeys(
3838

3939
const chunkNameCache = new Map()
4040
export function generateComponentChunkName(componentPath: string): string {
41+
if (componentPath.indexOf(`?__mdxPath=`) !== -1) {
42+
componentPath = componentPath.split(`?__mdxPath=`)[1]
43+
}
4144
if (chunkNameCache.has(componentPath)) {
4245
return chunkNameCache.get(componentPath)
4346
} else {

0 commit comments

Comments
 (0)