Skip to content

Showcase for duplicate import of different emotion root files

Notifications You must be signed in to change notification settings

swernerx/emotion-react-vite-issue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Showcases an issue with Emotion / MUI vs. Vite in a Mono-Repo

When running in dev-mode it renders the following warning to the browser console:

emotion-react.browser.esm.js:398 You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used.

It seems that both:

  1. emotion-react.cjs.dev.js
  2. emotion-react.browser.esm.js

are included into the browser bundles.

While 1. is bundled with the dependencies, 2. is loaded by the actual application as an ESM module.

About

Showcase for duplicate import of different emotion root files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published