erzr / next-babel-conditional-ssg-ssr

MIT License
12 stars 2 forks source link

Not working with nextjs 12 #3

Open tw1t611 opened 2 years ago

tw1t611 commented 2 years ago

Hi,

nextjs v12 uses a new compiler, which is not using babel https://nextjs.org/docs/messages/swc-disabled

Do you plan to upgrade the package to work with swc?

I also tried to make it work with the babel.config.js shown in the docs. It gave me the following error.

error - ./components/store.js
ReferenceError: t is not defined
    at Array.forEach (<anonymous>)
erzr commented 2 years ago

Thanks for reporting this, I'll take a look and see what's possible.

ngmiduc commented 2 years ago

When it will work with next12 - I am curious to test this plugin out!

gablabelle commented 2 years ago

Hello @erzr do you intend to merge @anthonyzou 's PR?

erzr commented 2 years ago

Sorry for the delay here, I'll review this and merge it today. @gablabelle

gablabelle commented 2 years ago

@erzr sorry to bug you lol ... could you please review & merge the PR? 😉

gablabelle commented 2 years ago

For those who want to use the patched version by @Anthonyzou in the meantime you can run to add it to your project

yarn add --dev https://github.com/Anthonyzou/next-babel-conditional-ssg-ssr.git\#patch-1