Skip to content

Commit

Permalink
fix(ui): wrong module graph when generating html.meta.json.gz in brow…
Browse files Browse the repository at this point in the history
…ser mode (#7214)
  • Loading branch information
userquin authored Jan 12, 2025
1 parent e0b4775 commit dccdd55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ui/node/reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ export default class HTMLReporter implements Reporter {
await Promise.all(
result.files.map(async (file) => {
const projectName = file.projectName || ''
const resolvedConfig = this.ctx.getProjectByName(projectName).config
const browser = resolvedConfig.browser.enabled && resolvedConfig.browser.ui
result.moduleGraph[projectName] ??= {}
result.moduleGraph[projectName][file.filepath] = await getModuleGraph(
this.ctx as any,
projectName,
file.filepath,
browser,
)
if (!result.sources[file.filepath]) {
try {
Expand Down

0 comments on commit dccdd55

Please sign in to comment.