8000 Added `edge-light` and `workerd` conditions (#3215) · emotion-js/emotion@a9f6912 · GitHub
[go: up one dir, main page]

Skip to content

Commit a9f6912

Browse files
authored
Added edge-light and workerd conditions (#3215)
1 parent d8ff8a5 commit a9f6912

File tree

7 files changed

+228
-49
lines changed

7 files changed

+228
-49
lines changed

.changeset/whiny-lemons-lay.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@emotion/use-insertion-effect-with-fallbacks': minor
3+
'@emotion/primitives': minor
4+
'@emotion/styled': minor
5+
'@emotion/cache': minor
6+
'@emotion/react': minor
7+
'@emotion/utils': minor
8+
---
9+
10+
Added `edge-light` and `workerd` conditions to `package.json` manifest to better serve users using Vercel Edge and Cloudflare Workers.

packages/cache/package.json

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@
1111
"default": "./dist/emotion-cache.cjs.js"
1212
},
1313
"development": {
14+
"edge-light": {
15+
"module": "./dist/emotion-cache.development.edge-light.esm.js",
16+
"import": "./dist/emotion-cache.development.edge-light.cjs.mjs",
17+
"default": "./dist/emotion-cache.development.edge-light.cjs.js"
18+
},
1419
"worker": {
15-
"module": "./dist/emotion-cache.development.worker.esm.js",
16-
"import": "./dist/emotion-cache.development.worker.cjs.mjs",
17-
"default": "./dist/emotion-cache.development.worker.cjs.js"
20+
"module": "./dist/emotion-cache.development.edge-light.esm.js",
21+
"import": "./dist/emotion-cache.development.edge-light.cjs.mjs",
22+
"default": "./dist/emotion-cache.development.edge-light.cjs.js"
23+
},
24+
"workerd": {
25+
"module": "./dist/emotion-cache.development.edge-light.esm.js",
26+
"import": "./dist/emotion-cache.development.edge-light.cjs.mjs",
27+
"default": "./dist/emotion-cache.development.edge-light.cjs.js"
1828
},
1929
"browser": {
2030
"module": "./dist/emotion-cache.browser.development.esm.js",
@@ -25,10 +35,20 @@
2535
"import": "./dist/emotion-cache.development.cjs.mjs",
2636
"default": "./dist/emotion-cache.development.cjs.js"
2737
},
38+
"edge-light": {
39+
"module": "./dist/emotion-cache.edge-light.esm.js",
40+
"import": "./dist/emotion-cache.edge-light.cjs.mjs",
41+
"default": "./dist/emotion-cache.edge-light.cjs.js"
42+
},
2843
"worker": {
29-
"module": "./dist/emotion-cache.worker.esm.js",
30-
"import": "./dist/emotion-cache.worker.cjs.mjs",
31-
"default": "./dist/emotion-cache.worker.cjs.js"
44+
"module": "./dist/emotion-cache.edge-light.esm.js",
45+
"import": "./dist/emotion-cache.edge-light.cjs.mjs",
46+
"default": "./dist/emotion-cache.edge-light.cjs.js"
47+
},
48+
"workerd": {
49+
"module": "./dist/emotion-cache.edge-light.esm.js",
50+
"import": "./dist/emotion-cache.edge-light.cjs.mjs",
51+
"default": "./dist/emotion-cache.edge-light.cjs.js"
3252
},
3353
"browser": {
3454
"module": "./dist/emotion-cache.browser.esm.js",
@@ -47,6 +67,8 @@
4767
"default": "./src/conditions/false.js"
4868
},
4969
"#is-browser": {
70+
"edge-light": "./src/conditions/false.js",
71+
"workerd": "./src/conditions/false.js",
5072
"worker": "./src/conditions/false.js",
5173
"browser": "./src/conditions/true.js",
5274
"default": "./src/conditions/is-browser.js"

packages/primitives/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"./package.json": "./package.json",
5454
"./macro": "./macro.js"
5555
},
56-
"imports": {},
5756
"preconstruct": {
5857
"exports": {
5958
"extra": {

packages/react/package.json

Lines changed: 106 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,20 @@
1010
"default": "./dist/emotion-react.cjs.js"
1111
},
1212
"development": {
13+
"edge-light": {
14+
"module": "./dist/emotion-react.development.edge-light.esm.js",
15+
"import": "./dist/emotion-react.development.edge-light.cjs.mjs",
16+
"default": "./dist/emotion-react.development.edge-light.cjs.js"
17+
},
1318
"worker": {
14-
"module": "./dist/emotion-react.development.worker.esm.js",
15-
"import": "./dist/emotion-react.development.worker.cjs.mjs&qu 10000 ot;,
16-
"default": "./dist/emotion-react.development.worker.cjs.js"
19+
"module": "./dist/emotion-react.development.edge-light.esm.js",
20+
"import": "./dist/emotion-react.development.edge-light.cjs.mjs",
21+
"default": "./dist/emotion-react.development.edge-light.cjs.js"
22+
},
23+
"workerd": {
24+
"module": "./dist/emotion-react.development.edge-light.esm.js",
25+
"import": "./dist/emotion-react.development.edge-light.cjs.mjs",
26+
"default": "./dist/emotion-react.development.edge-light.cjs.js"
1727
},
1828
"browser": {
1929
"module": "./dist/emotion-react.browser.development.esm.js",
@@ -24,10 +34,20 @@
2434
"import": "./dist/emotion-react.development.cjs.mjs",
2535
"default": "./dist/emotion-react.development.cjs.js"
2636
},
37+
"edge-light": {
38+
"module": "./dist/emotion-react.edge-light.esm.js",
39+
"import": "./dist/emotion-react.edge-light.cjs.mjs",
40+
"default": "./dist/emotion-react.edge-light.cjs.js"
41+
},
2742
"worker": {
28-
"module": "./dist/emotion-react.worker.esm.js",
29-
"import": "./dist/emotion-react.worker.cjs.mjs",
30-
"default": "./dist/emotion-react.worker.cjs.js"
43+
"module": "./dist/emotion-react.edge-light.esm.js",
44+
"import": "./dist/emotion-react.edge-light.cjs.mjs",
45+
"default": "./dist/emotion-react.edge-light.cjs.js"
46+
},
47+
"workerd": {
48+
"module": "./dist/emotion-react.edge-light.esm.js",
49+
"import": "./dist/emotion-react.edge-light.cjs.mjs",
50+
"default": "./dist/emotion-react.edge-light.cjs.js"
3151
},
3252
"browser": {
3353
"module": "./dist/emotion-react.browser.esm.js",
@@ -44,10 +64,20 @@
4464
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"
4565
},
4666
"development": {
67+
"edge-light": {
68+
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",
69+
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",
70+
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"
71+
},
4772
"worker": {
48-
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.worker.esm.js",
49-
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.worker.cjs.mjs",
50-
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.worker.cjs.js"
73+
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",
74+
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",
75+
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"
76+
},
77+
"workerd": {
78+
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",
79+
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",
80+
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"
5181
},
5282
"browser": {
5383
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.esm.js",
@@ -58,10 +88,20 @@
5888
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.mjs",
5989
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.js"
6090
},
91+
"edge-light": {
92+
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",
93+
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",
94+
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"
95+
},
6196
"worker": {
62-
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.esm.js",
63-
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.cjs.mjs",
64-
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.worker.cjs.js"
97+
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",
98+
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",
99+
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"
100+
},
101+
"workerd": {
102+
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",
103+
"import": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",
104+
"default": "./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"
65105
},
66106
"browser": {
67107
"module": "./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",
@@ -78,10 +118,20 @@
78118
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"
79119
},
80120
"development": {
121+
"edge-light": {
122+
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",
123+
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",
124+
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"
125+
},
81126
"worker": {
82-
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.worker.esm.js",
83-
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.worker.cjs.mjs",
84-
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.worker.cjs.js"
127+
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",
128+
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",
129+
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"
130+
},
131+
"workerd": {
132+
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",
133+
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",
134+
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"
85135
},
86136
"browser": {
87137
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.development.esm.js",
@@ -92,10 +142,20 @@
92142
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.cjs.mjs",
93143
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.cjs.js"
94144
},
145+
"edge-light": {
146+
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",
147+
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",
148+
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"
149+
},
95150
"worker": {
96-
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.esm.js",
97-
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.cjs.mjs",
98-
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.worker.cjs.js"
151+
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",
152+
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",
153+
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"
154+
},
155+
"workerd": {
156+
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",
157+
"import": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",
158+
"default": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"
99159
},
100160
"browser": {
101161
"module": "./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",
@@ -112,10 +172,20 @@
112172
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"
113173
},
114174
"development": {
175+
"edge-light": {
176+
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",
177+
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",
178+
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"
179+
},
115180
"worker": {
116-
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.worker.esm.js",
117-
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.worker.cjs.mjs",
118-
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.worker.cjs.js"
181+
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",
182+
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",
183+
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"
184+
},
185+
"workerd": {
186+
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",
187+
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",
188+
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"
119189
},
120190
"browser": {
121191
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.esm.js",
@@ -126,10 +196,20 @@
126196
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.mjs",
127197
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.js"
128198
},
199+
"edge-light": {
200+
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",
201+
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",
202+
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"
203+
},
129204
"worker": {
130-
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.esm.js",
131-
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.cjs.mjs",
132-
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.worker.cjs.js"
205+
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",
206+
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",
207+
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"
208+
},
209+
"workerd": {
210+
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",
211+
"import": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",
212+
"default": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"
133213
},
134214
"browser": {
135215
"module": "./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",
@@ -156,6 +236,8 @@
156236
"default": "./src/conditions/false.js"
157237
},
158238
"#is-browser": {
239+
"edge-light": "./src/conditions/false.js",
240+
"workerd": "./src/conditions/false.js",
159241
"worker": "./src/conditions/false.js",
160242
"browser": "./src/conditions/true.js",
161243
"default": "./src/conditions/is-browser.js"

packages/styled/package.json

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,20 @@
5151
"default": "./base/dist/emotion-styled-base.cjs.js"
5252
},
5353
"development": {
54+
"edge-light": {
55+
"module": "./base/dist/emotion-styled-base.development.edge-light.esm.js",
56+
"import": "./base/dist/emotion-styled-base.development.edge-light.cjs.mjs",
57+
"default": "./base/dist/emotion-styled-base.development.edge-light.cjs.js"
58+
},
5459
"worker": {
55-
"module": "./base/dist/emotion-styled-base.development.worker.esm.js",
56-
"import": "./base/dist/emotion-styled-base.development.worker.cjs.mjs",
57-
"default": "./base/dist/emotion-styled-base.development.worker.cjs.js"
60+
"module": "./base/dist/emotion-styled-base.development.edge-light.esm.js",
61+
"import": "./base/dist/emotion-styled-base.development.edge-light.cjs.mjs",
62+
"default": "./base/dist/emotion-styled-base.development.edge-light.cjs.js"
63+
},
64+
"workerd": {
65+
"module": "./base/dist/emotion-styled-base.development.edge-light.esm.js",
66+
"import": "./base/dist/emotion-styled-base.development.edge-light.cjs.mjs",
67+
"default": "./base/dist/emotion-styled-base.development.edge-light.cjs.js"
5868
},
5969
"browser": {
6070
"module": "./base/dist/emotion-styled-base.browser.development.esm.js",
@@ -65,10 +75,20 @@
6575
"import": "./base/dist/emotion-styled-base.development.cjs.mjs",
6676
"default": "./base/dist/emotion-styled-base.development.cjs.js"
6777
},
78+
"edge-light": {
79+
"module": "./base/dist/emotion-styled-base.edge-light.esm.js",
80+
"import": "./base/dist/emotion-styled-base.edge-light.cjs.mjs",
81+
"default": "./base/dist/emotion-styled-base.edge-light.cjs.js"
82+
},
6883
"worker": {
69-
"module": "./base/dist/emotion-styled-base.worker.esm.js",
70-
"import": "./base/dist/emotion-styled-base.worker.cjs.mjs",
71-
"default": "./base/dist/emotion-styled-base.worker.cjs.js"
84+
"module": "./base/dist/emotion-styled-base.edge-light.esm.js",
85+
"import": "./base/dist/emotion-styled-base.edge-light.cjs.mjs",
86+
"default": "./base/dist/emotion-styled-base.edge-light.cjs.js"
87+
},
88+
"workerd": {
89+
"module": "./base/dist/emotion-styled-base.edge-light.esm.js",
90+
"import": "./base/dist/emotion-styled-base.edge-light.cjs.mjs",
91+
"default": "./base/dist/emotion-styled-base.edge-light.cjs.js"
7292
},
7393
"browser": {
7494
"module": "./base/dist/emotion-styled-base.browser.esm.js",
@@ -85,10 +105,20 @@
85105
"default": "./dist/emotion-styled.cjs.js"
86106
},
87107
"development": {
108+
"edge-light": {
109+
"module": "./dist/emotion-styled.development.edge-light.esm.js",
110+
"import": "./dist/emotion-styled.development.edge-light.cjs.mjs",
111+
"default": "./dist/emotion-styled.development.edge-light.cjs.js"
112+
},
88113
"worker": {
89-
"module": "./dist/emotion-styled.development.worker.esm.js",
90-
"import": "./dist/emotion-styled.development.worker.cjs.mjs",
91-
"default": "./dist/emotion-styled.development.worker.cjs.js"
114+
"module": "./dist/emotion-styled.development.edge-light.esm.js",
115+
"import": "./dist/emotion-styled.development.edge-light.cjs.mjs",
116+
"default": "./dist/emotion-styled.development.edge-light.cjs.js"
117+
},
118+
"workerd": {
119+
"module": "./dist/emotion-styled.development.edge-light.esm.js",
120+
"import": "./dist/emotion-styled.development.edge-light.cjs.mjs",
121+
"default": "./dist/emotion-styled.development.edge-light.cjs.js"
92122
},
93123
"browser": {
94124
"module": "./dist/emotion-styled.browser.development.esm.js",
@@ -99,10 +129,20 @@
99129
"import": "./dist/emotion-styled.development.cjs.mjs",
100130
"default": "./dist/emotion-styled.development.cjs.js"
101131
},
132+
"edge-light": {
133+
"module": "./dist/emotion-styled.edge-light.esm.js",
134+
"import": "./dist/emotion-styled.edge-light.cjs.mjs",
135+
"default": "./dist/emotion-styled.edge-light.cjs.js"
136+
},
102137
"worker": {
103-
"module": "./dist/emotion-styled.worker.esm.js",
104-
"import": "./dist/emotion-styled.worker.cjs.mjs",
105-
"default": "./dist/emotion-styled.worker.cjs.js"
138+
"module": "./dist/emotion-styled.edge-light.esm.js",
139+
"import": "./dist/emotion-styled.edge-light.cjs.mjs",
140+
"default": "./dist/emotion-styled.edge-light.cjs.js"
141+
},
142+
"workerd": {
143+
"module": "./dist/emotion-styled.edge-light.esm.js",
144+
"import": "./dist/emotion-styled.edge-light.cjs.mjs",
145+
"default": "./dist/emotion-styled.edge-light.cjs.js"
106146
},
107147
"browser": {
108148
"module": "./dist/emotion-styled.browser.esm.js",
@@ -128,6 +168,8 @@
128168
"default": "./src/conditions/false.js"
129169
},
130170
"#is-browser": {
171+
"edge-light": "./src/conditions/false.js",
172+
"workerd": "./src/conditions/false.js",
131173
"worker": "./src/conditions/false.js",
132174
"browser": "./src/conditions/true.js",
133175
"default": "./src/conditions/is-browser.js"

0 commit comments

Comments
 (0)
0