Skip to content

Commit 44bcbd9

Browse files
fix: ignore whitespace when detecting handler and createMiddleware calls (#5458)
1 parent cdd8e91 commit 44bcbd9

File tree

1 file changed

+1
-1
lines changed
  • packages/start-plugin-core/src/create-server-fn-plugin

1 file changed

+1
-1
lines changed

packages/start-plugin-core/src/create-server-fn-plugin/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export function createServerFnPlugin(
8585
code: {
8686
// TODO apply this plugin with a different filter per environment so that .createMiddleware() calls are not scanned in server env
8787
// only scan files that mention `.handler(` | `.createMiddleware()`
88-
include: [/\.handler\(/, /.createMiddleware\(\)/],
88+
include: [/\.\s*handler\(/, /\.\s*createMiddleware\(\)/],
8989
},
9090
},
9191
async handler(code, id) {

0 commit comments

Comments
 (0)