File tree Expand file tree Collapse file tree 1 file changed +15
-18
lines changed
packages/vite/src/node/server/middlewares Expand file tree Collapse file tree 1 file changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -69,30 +69,27 @@ export function createDevHtmlTransformFn(
69
69
config . plugins ,
70
70
config . logger ,
71
71
)
72
+ const transformHooks = [
73
+ preImportMapHook ( config ) ,
74
+ ...preHooks ,
75
+ htmlEnvHook ( config ) ,
76
+ devHtmlHook ,
77
+ ...normalHooks ,
78
+ ...postHooks ,
79
+ postImportMapHook ( ) ,
80
+ ]
72
81
return (
73
82
server : ViteDevServer ,
74
83
url : string ,
75
84
html : string ,
76
85
originalUrl ?: string ,
77
86
) : Promise < string > => {
78
- return applyHtmlTransforms (
79
- html ,
80
- [
81
- preImportMapHook ( config ) ,
82
- ...preHooks ,
83
- htmlEnvHook ( config ) ,
84
- devHtmlHook ,
85
- ...normalHooks ,
86
- ...postHooks ,
87
- postImportMapHook ( ) ,
88
- ] ,
89
- {
90
- path : url ,
91
- filename : getHtmlFilename ( url , server ) ,
92
- server,
93
- originalUrl,
94
- } ,
95
- )
87
+ return applyHtmlTransforms ( html , transformHooks , {
88
+ path : url ,
89
+ filename : getHtmlFilename ( url , server ) ,
90
+ server,
91
+ originalUrl,
92
+ } )
96
93
}
97
94
}
98
95
You can’t perform that action at this time.
0 commit comments