File tree Expand file tree Collapse file tree
packages/test/web-server/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ const ruleConfig = {
3939 fix : '/esm$A'
4040} ;
4141
42- export const handleEsm = async ( req , res ) => {
42+ export async function handleESM ( req , res ) {
4343 try {
4444 const targetPath = req . url . replace ( / ^ \/ e s m / u, '' ) ;
4545 const upstreamUrl = `http://esm:8080${ targetPath } ` ;
@@ -65,6 +65,6 @@ export const handleEsm = async (req, res) => {
6565 } catch ( err ) {
6666 console . error ( 'ESM proxy error:' , err . stack ) ;
6767 res . writeHead ( 500 ) ;
68- return res . end ( " An internal server error occurred" ) ;
68+ return res . end ( ' An internal server error occurred' ) ;
6969 }
70- } ;
70+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { createServer as createSecureServer } from 'node:https';
55import selfsigned from 'selfsigned' ;
66import handleServe from 'serve-handler' ;
77
8- import { handleEsm } from './handleEsm ' ;
8+ import { handleESM } from './handleESM ' ;
99
1010const {
1111 // eslint-disable-next-line no-magic-numbers
@@ -19,7 +19,7 @@ const {
1919
2020 const handler = ( req , res ) => {
2121 if ( req . url . startsWith ( '/esm/' ) ) {
22- return handleEsm ( req , res ) ;
22+ return handleESM ( req , res ) ;
2323 }
2424
2525 return handleServe ( req , res , config ) ;
You can’t perform that action at this time.
0 commit comments