spectrum with nobuild esm.sh #8616
-
Can you use react-spectrum with nobuild esm.sh/cdn? I've got it "almost" running, but the styles aren't working because all CSS classes are prefixed with a random prefix. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
I don't believe we've tried this. Would you be willing to put together a minimal example in a github project? I'm not sure how the prefix would be applied if there was no build? but i'm also not familiar with how these are setup |
Beta Was this translation helpful? Give feedback.
-
Attached you find a minimal example. Put it in a web server and load index.html .
|
Beta Was this translation helpful? Give feedback.
-
ok: |
Beta Was this translation helpful? Give feedback.
-
esm.sh builds js-esm modules directly from the github or npm repository. in the browser babel compiles the jsx in App.jsx on the fly into a react js datastructure. |
Beta Was this translation helpful? Give feedback.
How can this possibly account for all the build things we may do that are non-standard? I think I'm still not quite understanding this project.
Wait, I think I see the issue. You're using the css from Spectrum CSS? as in https://github.com/adobe/spectrum-css via https://www.npmjs.com/package/@adobe/spectrum-css ?
This will have other issues, we have a fork of spectrum css because we've diverged from their implementation. This happened a long time ago for technical reasons, so there is probably a lot of delta. Can you access the CSS we ship at https://app.unpkg.com/@react-spectrum/[email protected]/files/dist/buttongroup.807718ea.css ?
What happens if we do other things in our build that …