next-plugin-custom-babel-config icon indicating copy to clipboard operation
next-plugin-custom-babel-config copied to clipboard

Add Next.js 12 support, update tests

Open hippotastic opened this issue 2 years ago • 0 comments

Next.js 12 requires another set of changes in order to keep this plugin working. Just like I did with Next.js 11 support, I added the necessary code to make it work again, and updated/added test cases to cover the new logic.

In order to make Next.js 12 actually use the Babel loader instead of its new default SWC loader, it may be required to add an empty .babelrc file to your Next.js root directory. I added a check and an error message for this scenario, too, so that users of this plugin will know what to do if Next.js isn't using Babel at all.

hippotastic avatar Mar 09 '22 15:03 hippotastic