Skip to content
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

Nextjs 13.4 SWC plugin not working with typewind #50

Closed
pawanrana1992 opened this issue Jul 7, 2023 Discussed in #49 · 1 comment
Closed

Nextjs 13.4 SWC plugin not working with typewind #50

pawanrana1992 opened this issue Jul 7, 2023 Discussed in #49 · 1 comment

Comments

@pawanrana1992
Copy link

pawanrana1992 commented Jul 7, 2023

Discussed in #49

Originally posted by pawanrana1992 July 7, 2023
I am trying to use Typewind in nextjs 13.4.x with SWC support, but it is not working as per the suggested configuration for swc from Typewind side. I am getting error like this. can anyone please suggest what is the right configuration for Nextjs 13.4. I love this plugin and any how I need to use it. please help.
Screenshot 2566-07-07 at 1 03 56 PM
Screenshot 2566-07-07 at 1 04 16 PM
Screenshot 2566-07-07 at 1 05 19 PM

Note: also if i am using typewind inside rollup lib, and after build and use inside nextjs project with babel.

  1. library build has reference to use custom config name like my_colors_primary_main. and not throw any error with rollup build. and storybook also works fine with custom colors.
  2. typewind inside the library used as external dep
  3. Nextjs setup with tailwind and typewind using babel to work. (tw.my_colors_primary_main works in the nextjs)
  4. Added the tailwind theme config as per lib requirement
  5. Generated the typewind config using npx typewind generate
  6. Importing a component from library to nextjs project
  7. the library throw error that my_colors_primary_main not found.

Please help how can i resolve this issue as well.

Thanks in advance team.

@Mokshit06
Copy link
Owner

I believe the latest release should fix this, sorry for the late response. Btw if the swc plugin throws any error later on due to compat reasons, you can always fall back to the babel plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants