Skip to content

Commit

Permalink
fix: delete entry name chunk in cacheGroup when build optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyuang committed Feb 29, 2024
1 parent 402b3c1 commit c813208
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/utils/src/server/cwd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const writeRoutes = async (routes: string, name?: string) => {
}

const getWebpackSplitCache = () => {
const { optimize } = loadConfig()
const { optimize, chunkName } = loadConfig()
if (optimize) {
const generateMap: Record<string, string> = require(resolve(getCwd(), './build/generateMap.json'))
const asyncChunkMap = require(resolve(getCwd(), './build/asyncChunkMap.json'))
Expand Down Expand Up @@ -67,6 +67,7 @@ const getWebpackSplitCache = () => {
}
webpackMap[chunkName].push(fileName)
}
delete webpackMap[chunkName]
const cacheGroups: Record<string, {
name: string
test: (module: SSRModule) => boolean | undefined
Expand Down

0 comments on commit c813208

Please sign in to comment.