File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
tools/pfe-tools/dev-server Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ html, body {
2525 line-height : var (--pf-global--LineHeight--md , 1.5 );
2626 text-align : left;
2727 background-color : var (--pf-global--BackgroundColor--100 , # fff );
28+ min-height : 100vh ;
2829}
2930
3031body {
31- min-height : 100% ;
3232 display : grid;
3333 grid-template-rows : var (--pf-demo-header-height , 4.375rem ) auto;
3434 grid-template-columns : 100vw ;
Original file line number Diff line number Diff line change @@ -123,6 +123,19 @@ function getRouter(options: PfeDevServerInternalConfig) {
123123 } else {
124124 return next ( ) ;
125125 }
126+ } )
127+
128+ . get ( `/${ elementsDir } /:element/:splatPath*.(css|js)` , async function ( ctx , next ) {
129+ ctx . response . etag = performance . now ( ) . toString ( ) ;
130+ return next ( ) ;
131+ } )
132+
133+ // Redirect `elements/pf-jazz-hands/*.js` to `elements/pf-jazz-hands/*.ts` for requests not previously handled
134+ . get ( `/${ elementsDir } /:element/:splatPath*.js` , async ctx => {
135+ const { element, splatPath } = ctx . params ;
136+ if ( element . startsWith ( tagPrefix ) && ! splatPath . includes ( '/' ) ) {
137+ ctx . redirect ( `/${ elementsDir } /${ element } /${ splatPath } .ts` ) ;
138+ }
126139 } ) ;
127140
128141 return router . routes ( ) ;
You can’t perform that action at this time.
0 commit comments