Skip to content

Commit e85164e

Browse files
authored
chore: remove maybeVirtualHtmlSet (#8010)
1 parent 6420ba0 commit e85164e

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

packages/vite/src/node/plugins/html.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -722,8 +722,6 @@ export function resolveHtmlTransforms(
722722
return [preHooks, postHooks]
723723
}
724724

725-
export const maybeVirtualHtmlSet = new Set<string>()
726-
727725
export async function applyHtmlTransforms(
728726
html: string,
729727
hooks: IndexHtmlTransformHook[],
@@ -734,8 +732,6 @@ export async function applyHtmlTransforms(
734732
const bodyTags: HtmlTagDescriptor[] = []
735733
const bodyPrependTags: HtmlTagDescriptor[] = []
736734

737-
maybeVirtualHtmlSet.add(ctx.filename)
738-
739735
for (const hook of hooks) {
740736
const res = await hook(html, ctx)
741737
if (!res) {

packages/vite/src/node/server/sourcemap.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import path from 'path'
22
import { promises as fs } from 'fs'
33
import type { Logger } from '../logger'
4-
import { createDebugger, normalizePath } from '../utils'
4+
import { createDebugger } from '../utils'
55
import type { SourceMap } from 'rollup'
6-
import { maybeVirtualHtmlSet } from '../plugins/html'
76

87
const isDebug = !!process.env.DEBUG
98
const debug = createDebugger('vite:sourcemap', {
@@ -43,7 +42,6 @@ export async function injectSourcesContent(
4342
sourcePath = path.resolve(sourceRoot, sourcePath)
4443
}
4544
return fs.readFile(sourcePath, 'utf-8').catch(() => {
46-
if (maybeVirtualHtmlSet.has(normalizePath(sourcePath))) return null
4745
missingSources.push(sourcePath)
4846
return null
4947
})

0 commit comments

Comments
 (0)