fetchguard 1.1.2 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -93,7 +93,23 @@ npm install fetchguard ts-micro-result
|
|
|
93
93
|
# yarn add fetchguard ts-micro-result
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
-
Peer dependency
|
|
96
|
+
**Peer dependency**: `ts-micro-result`
|
|
97
|
+
|
|
98
|
+
### Vite Configuration (Important!)
|
|
99
|
+
|
|
100
|
+
If using **Vite**, add this to your `vite.config.ts`:
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
export default defineConfig({
|
|
104
|
+
optimizeDeps: {
|
|
105
|
+
include: ['ts-micro-result'],
|
|
106
|
+
exclude: ['fetchguard'] // Required for Web Workers
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
> **Why?** FetchGuard uses Web Workers which need special handling in Vite.
|
|
112
|
+
> See [BUNDLER_SETUP.md](./BUNDLER_SETUP.md) for setup guides for all bundlers (Vite, Webpack, Next.js, etc.)
|
|
97
113
|
|
|
98
114
|
## Quick Start
|
|
99
115
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fetchguard",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "A secure fetch API library that runs in Web Workers with automatic token management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"files": [
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
|
+
"sideEffects": false,
|
|
20
21
|
"scripts": {
|
|
21
22
|
"build": "tsup && npm run typecheck",
|
|
22
23
|
"dev": "tsup --watch",
|