You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/apps/shopify-api/README.md
+27-5Lines changed: 27 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,31 +51,53 @@ The first thing you need to import is the adapter for your app's runtime. This w
51
51
import'@shopify/shopify-api/adapters/node';
52
52
```
53
53
54
+
> **Note** Some bundlers may aggressively tree-shake the adapter imports in production builds. If you encounter a "Missing adapter implementation" error, you can use the exported constant to ensure the adapter is loaded:
>// Optional: Check the adapter loaded successfully
59
+
>if (!nodeAdapterInitialized) {
60
+
>thrownewError('Failed to initialize Node.js adapter');
61
+
> }
62
+
>```
63
+
54
64
</div><div>CloudFlare Worker
55
65
56
66
```ts
57
67
import'@shopify/shopify-api/adapters/cf-worker';
58
68
```
59
69
70
+
> **Note** Some bundlers may aggressively tree-shake the adapter imports in production builds. If you encounter a "Missing adapter implementation" error, you can use the exported constant to ensure the adapter is loaded:
>// Optional: Check the adapter loaded successfully
75
+
>if (!cfWorkerAdapterInitialized) {
76
+
>thrownewError('Failed to initialize Cloudflare Worker adapter');
77
+
> }
78
+
>```
79
+
60
80
</div>
61
81
</div><div>Generic runtimes that implement the <a href="https://developer.mozilla.org/en-US/docs/Web/API">Web API</a>
62
82
63
83
```ts
64
84
import'@shopify/shopify-api/adapters/web-api';
65
85
```
66
86
67
-
</div>
68
-
69
87
> **Note** Some bundlers may aggressively tree-shake the adapter imports in production builds. If you encounter a "Missing adapter implementation" error, you can use the exported constant to ensure the adapter is loaded:
0 commit comments