File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ const filesConfig : esbuild.BuildOptions = {
5151 tsconfig : './deno.json' ,
5252 outdir : './dist' ,
5353 outbase : './src/client' ,
54- entryNames : '[dir]/bundle.min ' ,
54+ entryNames : '[dir]/bundle' ,
5555 entryPoints : [
5656 './src/client/app/**/index.tsx' ,
5757 './src/client/app/**/index.scss' ,
Original file line number Diff line number Diff line change 44 < meta charset ="UTF-8 " />
55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
66 < title > Home</ title >
7- < link rel ="shortcut icon " href ="/assets/favicon.svg " type ="image/x-icon " />
8- < link rel ="stylesheet " href ="/bundle.min. css " />
7+ < link rel ="shortcut icon " href =". /assets/favicon.svg " type ="image/x-icon " />
8+ < link rel ="stylesheet " href ="/bundle.css " />
99 </ head >
1010 < body >
1111 < h1 class ="title "> Home</ h1 >
Original file line number Diff line number Diff line change @@ -15,20 +15,22 @@ const routes: Route[] = [
1515 )
1616 } ,
1717 {
18- pattern : new URLPattern ( { pathname : '/:path*/assets/:dynamicAsset* ' } ) ,
18+ pattern : new URLPattern ( { pathname : '/:asset ' } ) ,
1919 handler : ( request , _info , parameters ) => {
20- const { path , dynamicAsset } = parameters ?. pathname . groups ?? { } ;
20+ const { asset } = parameters ?. pathname . groups ?? { } ;
2121 return pageHandler (
2222 request ,
2323 appDirectory ,
24- path ,
25- '/assets/' + dynamicAsset
24+ '' ,
25+ asset
2626 ) ;
2727 }
2828 } ,
2929 {
30- pattern : new URLPattern ( { pathname : '/:path(.*)' } ) ,
31- handler : ( request ) => {
30+ pattern : new URLPattern ( { pathname : '/:page([^\.]*)' } ) ,
31+ handler : ( request , _info , parameters ) => {
32+ console . log ( 'page' , parameters ?. pathname . groups . page ) ;
33+
3234 return pageHandler ( request , appDirectory , '' )
3335 }
3436 }
You can’t perform that action at this time.
0 commit comments