Skip to content

Commit cade6c8

Browse files
Add support for jsx and tsx file extensions
Co-authored-by: Sunil Pai <[email protected]>
1 parent ca43b9e commit cade6c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/wrangler/pages/functions/filepath-routing.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export async function generateConfigFromFileTree({
3333

3434
await forEachFile(baseDir, async (filepath) => {
3535
const ext = path.extname(filepath);
36-
if (/^\.(mjs|js|ts)$/.test(ext)) {
36+
if (/^\.(mjs|js|ts|tsx|jsx)$/.test(ext)) {
3737
// transform the code to ensure we're working with vanilla JS + ESM
3838
const { code } = await transform(await fs.readFile(filepath, "utf-8"), {
3939
loader: ext === ".ts" ? "ts" : "js",

0 commit comments

Comments
 (0)