Skip to content

Commit

Permalink
feat: support more extensions that babel macros can be written in (#175)
Browse files Browse the repository at this point in the history
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
  • Loading branch information
quantizor and kentcdodds committed May 5, 2021
1 parent d613985 commit 856e5f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function createMacro(macro, options = {}) {
function nodeResolvePath(source, basedir) {
return resolve.sync(source, {
basedir,
extensions: ['.js', '.ts', '.tsx', '.mjs', '.cjs', '.jsx'],
// This is here to support the package being globally installed
// read more: https://github.com/kentcdodds/babel-plugin-macros/pull/138
paths: [p.resolve(__dirname, '../../')],
Expand Down

0 comments on commit 856e5f4

Please sign in to comment.