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

experimental flag to transpile styled-components to next-yak #113

Open
jantimon opened this issue Jul 9, 2024 · 1 comment
Open

experimental flag to transpile styled-components to next-yak #113

jantimon opened this issue Jul 9, 2024 · 1 comment

Comments

@jantimon
Copy link
Owner

jantimon commented Jul 9, 2024

Maybe we could add an experimental flag in the withYak config to automatically transpile styled-components code to next-yak. This feature would allow users to easily test existing styled-components-based projects with next-yak, potentially identifying performance improvements and compatibility issues.

Benefits:

  1. Easier migration path for existing styled-components projects
  2. Quick performance comparison between styled-components and next-yak
  3. Identify areas where next-yak might need additional features to fully support styled-components syntax

Proposed Implementation:

  • Add a new experimental flag in withYak config, e.g., library: "styled-components"
  • When enabled, the loader would detect and transform styled-components imports to the next-yak equivalent
@Mad-Kat
Copy link
Collaborator

Mad-Kat commented Jul 13, 2024

At the moment we don't support 100% of all features that styled-components has. Is the idea to somehow bail out if we find something that we don't support or just generate a warning?

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