Skip to content

Commit 856e5f4

Browse files
feat: support more extensions that babel macros can be written in (#175)
Co-authored-by: Kent C. Dodds <[email protected]>
1 parent d613985 commit 856e5f4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ function createMacro(macro, options = {}) {
6565
function nodeResolvePath(source, basedir) {
6666
return resolve.sync(source, {
6767
basedir,
68+
extensions: ['.js', '.ts', '.tsx', '.mjs', '.cjs', '.jsx'],
6869
// This is here to support the package being globally installed
6970
// read more: https://github.com/kentcdodds/babel-plugin-macros/pull/138
7071
paths: [p.resolve(__dirname, '../../')],

0 commit comments

Comments
 (0)