diff --git a/.changeset/seven-ways-collect.md b/.changeset/seven-ways-collect.md new file mode 100644 index 000000000..6583220b5 --- /dev/null +++ b/.changeset/seven-ways-collect.md @@ -0,0 +1,26 @@ +--- +'@emotion/babel-plugin': minor +'@emotion/babel-plugin-jsx-pragmatic': minor +'@emotion/babel-preset-css-prop': minor +'@emotion/cache': minor +'@emotion/css': minor +'@emotion/css-prettifier': minor +'@emotion/eslint-plugin': minor +'@emotion/hash': minor +'@emotion/is-prop-valid': minor +'@emotion/jest': minor +'@emotion/memoize': minor +'@emotion/native': minor +'@emotion/primitives': minor +'@emotion/primitives-core': minor +'@emotion/react': minor +'@emotion/serialize': minor +'@emotion/server': minor +'@emotion/sheet': minor +'@emotion/styled': minor +'@emotion/unitless': minor +'@emotion/utils': minor +'@emotion/weak-memoize': minor +--- + +`exports` field has been added to the `package.json` manifest. This fixes how our default exports are treated by Node.js when using their native support for ES modules. It also limits what files can be imported from a package but we've tried our best to allow importing all the files that were considered to be a part of the public API. diff --git a/.changeset/wet-teachers-peel.md b/.changeset/wet-teachers-peel.md new file mode 100644 index 000000000..824596e61 --- /dev/null +++ b/.changeset/wet-teachers-peel.md @@ -0,0 +1,7 @@ +--- +'@emotion/react': minor +'@emotion/styled': minor +'@emotion/utils': minor +--- + +Thanks to the added `exports` field, the package now includes a `worker` condition that can be utilized by properly configured bundlers when targeting worker-like environments. It fixes the issue with browser-specific files being prioritized by some bundlers when targeting workers.