styled-components / xstyled

A utility-first CSS-in-JS framework built for React. πŸ’…πŸ‘©β€πŸŽ€βš‘οΈ
https://xstyled.dev
MIT License
2.27k stars 106 forks source link

fix: move away from mjs extension to work in more environments #275

Closed AhmedAymanM closed 3 years ago

AhmedAymanM commented 3 years ago

Summary

moved away from using .mjs files extension for es-modules as it seems that there are some compatibility issues with It

Test plan

This code doesn't change any functionality, I ran the tests, and they all pass.

netlify[bot] commented 3 years ago

:construction_worker: Deploy request for xstyled pending review. Visit the deploys page to approve it

:hammer: Explore the source changes: 613e80afede1968db3f93b54e36ce85b60b7fae5

snaer-yolabs commented 3 years ago

Nice work man! Hoping this goes out soon

snaer-yolabs commented 3 years ago

This should fix this issue https://github.com/gregberge/xstyled/issues/264

AhmedAymanM commented 3 years ago

did you test it locally? @snaer-yolabs I tested it with storybook and it fixed the issue for me. I didn't try it with next.js or other tools though but I believe it should work nonetheless.

snaer-yolabs commented 3 years ago

No I did not test it locally @AhmedAymanM

codecov[bot] commented 3 years ago

Codecov Report

Merging #275 (613e80a) into main (4865316) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 613e80a differs from pull request most recent head add2b2a. Consider uploading reports for the commit add2b2a to get more accurate results Impacted file tree graph

@@           Coverage Diff           @@
##             main     #275   +/-   ##
=======================================
  Coverage   92.73%   92.73%           
=======================================
  Files          60       60           
  Lines        1252     1252           
  Branches      244      244           
=======================================
  Hits         1161     1161           
  Misses         91       91           

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 4865316...add2b2a. Read the comment docs.

electroheadfx commented 3 years ago

I have the same error under ViteJS/React install : http://host.electroheadfx.fr/efxbox/laurent/Capturedecran2021-06-19a18.34.32.png I have not any issue with styled-components, chakra-ui (so styled-system) packages with VITE