Skip to content

Commit 362ceab

Browse files
committed
feat(exportfunctions): update search glob to sensible default to find both js and ts files
This will enable exportFunctions to work both in a js environment and ts environment|This is usefull because when serving applications they are often run with ts-node or otherwise not compiled to js, but when deployed are compiled to js. Meaning the same code doesn't work between environments. This should fix that. BREAKING CHANGE: The new default search glob may break some setups in rare situations where js files and ts files are in the same directory.
1 parent c064d8f commit 362ceab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/export-functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export function exportFunctions({
166166
__filename,
167167
exports,
168168
functionDirectoryPath = './',
169-
searchGlob = '**/*.js',
169+
searchGlob = '**/*.{js|ts}',
170170
funcNameFromRelPath = funcNameFromRelPathDefault,
171171
enableLogger = false,
172172
logger = console,

0 commit comments

Comments
 (0)