Skip to content

Commit 8e4c73d

Browse files
fix(tools): load ts sources from core (#2687)
Co-authored-by: Steven Spriggs <[email protected]>
1 parent 1d89f73 commit 8e4c73d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/pfe-tools/dev-server/plugins/pfe-dev-server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ function getRouter(options: PfeDevServerInternalConfig) {
130130
return next();
131131
})
132132

133+
// Redirect `core/pfe-core/controllers/thingy.js` to `core/pfe-core/controllers/thingy.ts` for requests not previously handled
134+
.get(`/core/pfe-core/:splatPath*.js`, async ctx => {
135+
ctx.redirect(`/core/pfe-core/${ctx.params.splatPath}.ts`);
136+
})
137+
133138
// Redirect `elements/pf-jazz-hands/*.js` to `elements/pf-jazz-hands/*.ts` for requests not previously handled
134139
.get(`/${elementsDir}/:element/:splatPath*.js`, async ctx => {
135140
const { element, splatPath } = ctx.params;

0 commit comments

Comments
 (0)