-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow macros to end in .cjs #161
Conversation
Codecov Report
@@ Coverage Diff @@
## master #161 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 97 98 +1
Branches 22 22
=========================================
+ Hits 97 98 +1
Continue to review full report at Codecov.
|
Hmm, there might be some problems with how references are determined too. Investigating further. |
Ah ok no this error I'm seeing is a problem of my own making (not a bug). |
By the way if anyone finds this and needs the workaround it's simple enough. Just add a bit to your babel config:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super 👍 Thanks!
@all-contributors please add @conartist6 for code and docs |
I've put up a pull request to add @conartist6! 🎉 |
Thanks so much for your help! I've added you as a collaborator on the project. Please make sure that you review the |
Thanks! As you suggested I read those and watched the repo. I love makeapullrequest.com and the explicit goal of inclusivity and growing the community of contributors and maintainers. |
🎉 This PR is included in version 3.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
When a macro is defined in a package with
"type": "module"
set inpackage.json
,babel-plugin-macros
usesrequire
to load it. This fails because require is not allowed on an es module (which the macro is now assumed to be). The answer for the moment is for the macro not to be a module, which requires that its extension bemacro.cjs
and that it be imported with an explicit extension. This change ensures that that is possible.