@@ -53,10 +53,6 @@ export interface TransformOptions {
53
53
* @deprecated inferred from environment
54
54
*/
55
55
ssr ?: boolean
56
- /**
57
- * @internal
58
- */
59
- html ?: boolean
60
56
/**
61
57
* @internal
62
58
*/
@@ -84,8 +80,6 @@ export function transformRequest(
84
80
if ( environment . _closing && environment . config . dev . recoverable )
85
81
throwClosedServerError ( )
86
82
87
- const cacheKey = `${ options . html ? 'html:' : '' } ${ url } `
88
-
89
83
// This module may get invalidated while we are processing it. For example
90
84
// when a full page reload is needed after the re-processing of pre-bundled
91
85
// dependencies when a missing dep is discovered. We save the current time
@@ -108,7 +102,7 @@ export function transformRequest(
108
102
// last time this module is invalidated
109
103
const timestamp = monotonicDateNow ( )
110
104
111
- const pending = environment . _pendingRequests . get ( cacheKey )
105
+ const pending = environment . _pendingRequests . get ( url )
112
106
if ( pending ) {
113
107
return environment . moduleGraph
114
108
. getModuleByUrl ( removeTimestampQuery ( url ) )
@@ -135,13 +129,13 @@ export function transformRequest(
135
129
let cleared = false
136
130
const clearCache = ( ) => {
137
131
if ( ! cleared ) {
138
- environment . _pendingRequests . delete ( cacheKey )
132
+ environment . _pendingRequests . delete ( url )
139
133
cleared = true
140
134
}
141
135
}
142
136
143
137
// Cache the request and clear it once processing is done
144
- environment . _pendingRequests . set ( cacheKey , {
138
+ environment . _pendingRequests . set ( url , {
145
139
request,
146
140
timestamp,
147
141
abort : clearCache ,
@@ -270,11 +264,6 @@ async function loadAndTransform(
270
264
if ( loadResult == null ) {
271
265
const file = cleanUrl ( id )
272
266
273
- // if this is an html request and there is no load result, skip ahead to
274
- // SPA fallback.
275
- if ( options . html && ! id . endsWith ( '.html' ) ) {
276
- return null
277
- }
278
267
// try fallback loading it from fs as string
279
268
// if the file is a binary, there should be a plugin that already loaded it
280
269
// as string
@@ -288,10 +277,7 @@ async function loadAndTransform(
288
277
code = await fsp . readFile ( file , 'utf-8' )
289
278
debugLoad ?.( `${ timeFrom ( loadStart ) } [fs] ${ prettyUrl } ` )
290
279
} catch ( e ) {
291
- if ( e . code !== 'ENOENT' ) {
292
- if ( e . code === 'EISDIR' ) {
293
- e . message = `${ e . message } ${ file } `
294
- }
280
+ if ( e . code !== 'ENOENT' && e . code !== 'EISDIR' ) {
295
281
throw e
296
282
}
297
283
}
0 commit comments