We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
jsx
tsx
1 parent ca43b9e commit cade6c8Copy full SHA for cade6c8
packages/wrangler/pages/functions/filepath-routing.ts
@@ -33,7 +33,7 @@ export async function generateConfigFromFileTree({
33
34
await forEachFile(baseDir, async (filepath) => {
35
const ext = path.extname(filepath);
36
- if (/^\.(mjs|js|ts)$/.test(ext)) {
+ if (/^\.(mjs|js|ts|tsx|jsx)$/.test(ext)) {
37
// transform the code to ensure we're working with vanilla JS + ESM
38
const { code } = await transform(await fs.readFile(filepath, "utf-8"), {
39
loader: ext === ".ts" ? "ts" : "js",
0 commit comments