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

(refactor):Improve the support for Image component from next #696

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

JayaKrishnaNamburu
Copy link
Member

fixes #686

But, currently the new Image component doesn't work as expected with styled-jsx. Here is the issue vercel/next.js#38822 Let's wait for some info on that

@JayaKrishnaNamburu
Copy link
Member Author

I came back looking at this, @mihaisampaleanu here is where we left the discussion to handle this. Currently next/image don't support className prop and apply them on the image. Instead they ask to adopt css-modules. So, we should decide if we move ahead and make Next - CSS Modules as default for the nextjs projects.

The only down side is, any legacy custom-scripts that are following classnames might break. Since css-modules hash the class-names for deployments. But, at the end this switch will be a huge perf gain. So, should we switch to it and give warning to old scripts users ?

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (53c7b8a) 70.52% compared to head (b9ca4ee) 70.52%.

Additional details and impacted files
@@             Coverage Diff              @@
##           development     #696   +/-   ##
============================================
  Coverage        70.52%   70.52%           
============================================
  Files              170      170           
  Lines             6999     6999           
  Branches          2026     2026           
============================================
  Hits              4936     4936           
  Misses            2060     2060           
  Partials             3        3           
Impacted Files Coverage Δ
...ort-project-generator-next/src/project-template.ts 100.00% <ø> (ø)
...ckages/teleport-plugin-jsx-next-image/src/index.ts 91.66% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

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

Successfully merging this pull request may close these issues.

Using Image from next/Image all the time for all images.
1 participant