Spread emotion/react version import #2367
-
Is your feature request related to a problem? Please describe. Describe the solution you'd like
Additional context theme-ui/packages/core/src/index.ts Line 8 in f5ae7d6 theme-ui/packages/core/src/index.ts Line 38 in f5ae7d6 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @felipe-silva-devtech, to be frank I don't think that your suggestion fixes your problem. It may change the warning text, because 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 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. |
Beta Was this translation helpful? Give feedback.
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 guessespackageInfo
.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.