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

Custom CacheProvider not consistently being applied to imported component libraries using emotion. #3169

Open
jmdarling opened this issue Mar 28, 2024 · 0 comments

Comments

@jmdarling
Copy link

Current behavior:

My custom CacheProvider is not consistently "grabbing" styles imported from a library, resulting in injected <style> tags not having the expected data-emotion attribute and nonce attribute.

Screenshot 2024-03-27 at 8 16 39 PM

To reproduce:

Reproduction repository: https://github.com/jmdarling/emotion-library-caching-issue

  1. Clone the repository: git clone https://github.com/jmdarling/emotion-library-caching-issue
  2. Install dependencies: npm install
  3. Build the library: npm run build
  4. Start the development server: npm run dev
  5. Open your browser and navigate to http://localhost:5173

Expected behavior:

My custom CacheProvider will properly "grab" styles imported from a library and I will see the correct data-emotion attribute and nonce attribute on injected <style> tags.

Environment information:

  • react version: 18.2.0
  • @emotion/react version: 11.11.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant