@@ -57,7 +57,7 @@ export async function create_plugin(config, cwd) {
5757 const url = id . startsWith ( '..' ) ? `/@fs${ path . posix . resolve ( id ) } ` : `/${ id } ` ;
5858
5959 const module = /** @type {import('types').SSRComponent } */ (
60- await vite . ssrLoadModule ( url , { fixStacktrace : false } )
60+ await vite . ssrLoadModule ( url )
6161 ) ;
6262 const node = await vite . moduleGraph . getModuleByUrl ( url ) ;
6363
@@ -78,7 +78,7 @@ export async function create_plugin(config, cwd) {
7878 ( query . has ( 'svelte' ) && query . get ( 'type' ) === 'style' )
7979 ) {
8080 try {
81- const mod = await vite . ssrLoadModule ( dep . url , { fixStacktrace : false } ) ;
81+ const mod = await vite . ssrLoadModule ( dep . url ) ;
8282 styles [ dep . url ] = mod . default ;
8383 } catch {
8484 // this can happen with dynamically imported modules, I think
@@ -111,7 +111,7 @@ export async function create_plugin(config, cwd) {
111111 shadow : route . shadow
112112 ? async ( ) => {
113113 const url = path . resolve ( cwd , /** @type {string } */ ( route . shadow ) ) ;
114- return await vite . ssrLoadModule ( url , { fixStacktrace : false } ) ;
114+ return await vite . ssrLoadModule ( url ) ;
115115 }
116116 : null ,
117117 a : route . a . map ( ( id ) => ( id ? manifest_data . components . indexOf ( id ) : undefined ) ) ,
@@ -127,7 +127,7 @@ export async function create_plugin(config, cwd) {
127127 types,
128128 load : async ( ) => {
129129 const url = path . resolve ( cwd , route . file ) ;
130- return await vite . ssrLoadModule ( url , { fixStacktrace : false } ) ;
130+ return await vite . ssrLoadModule ( url ) ;
131131 }
132132 } ;
133133 } ) ,
@@ -138,7 +138,7 @@ export async function create_plugin(config, cwd) {
138138 for ( const key in manifest_data . matchers ) {
139139 const file = manifest_data . matchers [ key ] ;
140140 const url = path . resolve ( cwd , file ) ;
141- const module = await vite . ssrLoadModule ( url , { fixStacktrace : false } ) ;
141+ const module = await vite . ssrLoadModule ( url ) ;
142142
143143 if ( module . match ) {
144144 matchers [ key ] = module . match ;
@@ -208,7 +208,7 @@ export async function create_plugin(config, cwd) {
208208
209209 /** @type {Partial<import('types').Hooks> } */
210210 const user_hooks = resolve_entry ( config . kit . files . hooks )
211- ? await vite . ssrLoadModule ( `/${ config . kit . files . hooks } ` , { fixStacktrace : false } )
211+ ? await vite . ssrLoadModule ( `/${ config . kit . files . hooks } ` )
212212 : { } ;
213213
214214 const handle = user_hooks . handle || ( ( { event, resolve } ) => resolve ( event ) ) ;
@@ -371,12 +371,7 @@ function not_found(res, message = 'Not found') {
371371 * @param {import('connect').Server } server
372372 */
373373function remove_html_middlewares ( server ) {
374- const html_middlewares = [
375- 'viteIndexHtmlMiddleware' ,
376- 'vite404Middleware' ,
377- 'viteSpaFallbackMiddleware' ,
378- 'viteServeStaticMiddleware'
379- ] ;
374+ const html_middlewares = [ 'viteServeStaticMiddleware' ] ;
380375 for ( let i = server . stack . length - 1 ; i > 0 ; i -- ) {
381376 // @ts -expect-error using internals until https://github.com/vitejs/vite/pull/4640 is merged
382377 if ( html_middlewares . includes ( server . stack [ i ] . handle . name ) ) {
0 commit comments