Skip to content

Spread emotion/react version import #2367

Discussion options

You must be logged in to vote

Hey @felipe-silva-devtech, to be frank I don't think that your suggestion fixes your problem.

It may change the warning text, because packageInfo was inferred from our import, but it doesn't solve anything.

You are building an UMD build with Rollup, and it expects the package.json from Emotion to be assigned to a global variable. It doesn't know that variable, because you did not set output.globals, and it guesses packageInfo.

Thing is, I don't think there is such a global variable. Moreover, Theme UI doesn't build to UMD, so there won't be a global variable for it too. Are you confident that you need an UMD build? ESM and CJS builds are usually enough for the most common cases.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hasparus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2361 on November 22, 2022 14:57.